This might be related to
CMP-644, but I looked at the changes made to the source code to fix that issue, and it doesn't appear to be related. I downloaded the latest (at the time) nightly build anyway (CMP-NIGHTLY-28,
http://build.compass-project.org/download/CMP20-NIGHTLY/artifacts/build-28/Release/compass-2.0.1-with-dependencies.zip
), but my issue still persists.
I'm using a JDBC store, and I have disableSchemaOperations set to true. When I create a Compass for the first time, all of the rows in the database table get marked as deleted.
I tracked it down in the code, and it appears that the call to indexExists(...) on line 512 of DefaultLuceneSearchEngineStore.java (Subversion v. 3020) is returning false, even though a perfectly valid index exists, and was working fine before I shut down and restarted my application.
I didn't dig further to determine why indexExists is false. I will post a comment in this issue if I discover anything further.
I'm using an Oracle database, and my DBAs have the table set up under a different schema, with a public synonym providing access to the table. Compass uses the "user_tables" system table to determine whether the table exists, and my understanding of the situation is that user_tables only provides access to tables in the user's current schema.
I've modified OracleDialect to user all_tables instead, and it has fixed my problem. I suspect that it would be better to make sufficient changes to Compass that it could provide a schema name, since OracleDialect and JdbcTable already provide for this. It appears that JdbcDirectory simply doesn't support using that functionality.
Since I've found a workaround, I think that the priority of this issue can be reduced.