[ 
https://issues.apache.org/jira/browse/CLEREZZA-564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13053253#comment-13053253
 ] 

Daniel Spicar commented on CLEREZZA-564:
----------------------------------------

"I think a nice option would be to create a constructor new LuceneTools(boolean 
optimizeThread) which automatically starts an optimize thread which does 
optimizations every X secs/mins/hours when index is not being used."

I have been considering this. The problem I have is how to determine, that the 
Index is not being used? In particular the current implementation has a flaw 
that the index writer is not only opened for indexing resources but in general 
it remains open after it has been used and then it is being reused. This is 
because of the suggestion from the Lucene FAQ (I think) to reuse the instance. 
However while it sits there it probably hogs some resources even when nothing 
is written to the index. Also I am not sure how to determine if it is being 
used or not (I read about Lucene 2.3 that it was common practice to close the 
IndexWriter after indexing and then simply checking if an open IndexWriter was 
available was an indication that is is being used.) I am not sure currently 
what is best practice in Lucene 3. Do you know that?

> CRIS: call optimize in an extra thread
> --------------------------------------
>
>                 Key: CLEREZZA-564
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-564
>             Project: Clerezza
>          Issue Type: Improvement
>            Reporter: Tsuyoshi Ito
>         Attachments: ZZ-564-rdf.cris.core-optimize-20110622-patch.diff
>
>
> Comment from Tommaso (see 
> http://mail-archives.apache.org/mod_mbox/incubator-clerezza-dev/201106.mbox/%[email protected]%3E)
> A possible enhancement could be to create an OptimizeThread with a 
> timeInterval constructor which optimizes the index, if there is not "much" 
> activity (i.e.: analyze isLocked, InfoStream, etc), every timeInterval 
> seconds.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to