How can I know when SQL Full Text Index Population is finished?

Posted by GarethOwen on Stack Overflow See other posts from Stack Overflow or by GarethOwen
Published on 2010-04-28T08:40:18Z Indexed on 2010/04/28 8:43 UTC
Read the original article Hit count: 165

We are writing unit tests for our ASP.NET application that run against a test SQL Server database. That is, the ClassInitialize method creates a new database with test data, and the ClassCleanup deletes the database. We do this by running .bat scripts from code.

The classes under test are given a connection string that connects to the unit test database rather than a production database.

Our problem is, that the database contains a full text index, which needs to be fully populated with the test data in order for our tests to run as expected.

As far as I can tell, the fulltext index is always populated in the background. I would like to be able to either:

  1. Create the full text index, fully populated, with a synchronous (transact-SQL?) statement, or
  2. Find out when the fulltext population is finished, is there a callback option, or can I ask repeatedly?

My current solution is to force a delay at the end the class initialize method - 5 seconds seems to work - because I can't find anything in the documentation.

© Stack Overflow or respective owner

Related posts about fulltext-index

Related posts about population