AnsweredAssumed Answered

Problem with JCR and Lucene indexing

Question asked by ricky84 on Jul 31, 2009
Hi folks,
this is my first message here.

Let me spend a few words about my situation: I'm writing a Java application that uses Alfresco Embedded to import a lot of documents into a JCR repository.
That JCR repository is shared with another instance of Alfresco. This means that both Alfresco instances point to the same JCR repository (my application imports the documents, and the standalone Alfresco is used to browse them).

Everything works great (even using a custom content model with custom properties), except for one thing: the Lucene indexes (needed to perform later searches on the just imported documents through their custom properties) seem to be "out of date".

I mean: once the import task gets finished, if I search for the documents with a custom web client I get no results (even if, using the Node Inspector of the Alfresco Web Client, I can see that the documents are there with the right properties). The only way to be able to fetch the documents using Lucene is to restart the application server (TomCat)… or maybe wait for Lucene to finish indexing its data?!?

For testing purposes, I'm using Alfresco on CentOS GNU/Linux with MySQL and on Windows Server 2003 with SQLServer.

In my humble opition, it seems to be a delayed or asynchronous Lucene indexing problem.

Do you have any idea? Or have you ever faced a problem like this?

Any kind help would be really appreciated.

Thanks! :-D

Outcomes