Hi,

I have a strange problem with lucene in one of my projects.
My business application adds business objects which are stored in a database into a lucene index. So each time a user creates a new business object the data is added into the index. This works all fine. The project is a JSF Web Application and I use a simple pojo class to update the index.

I create the indexWriter in the following way:

    Directory indexDir = createIndexDirectory(prop);
    Analyzer analyzer = new StandardAnalyzer();
    IndexWriterConfig indexWriterConfig = new IndexWriterConfig(
                Version.LATEST, analyzer);
    indexWriterConfig.setWriteLockTimeout(10000);

Full code can be reviewed at Github (https://github.com/imixs/imixs-workflow/blob/master/imixs-workflow-engine/src/main/java/org/imixs/workflow/plugins/jee/extended/LucenePlugin.java)

Now we have the problem, that in some cases (we guess it happens when users add objects in very short time frames 3-5 objects in one minute) no index is added. I also got no exception so it is hard to identify the case when it happens. The result is that some objects are not listed in the index. When I call my update-method for these objects once again everything is fine.

Can anybody give me a hint what could be wrong with my approach. Maybe for web applications with multi-user access I need to take more care how to create the indexWriter?

Thanks for any help

Ralph
--


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to