[hibernate-issues] [Hibernate-JIRA] Moved: (HSEARCH-11) Provide access to IndexWriter.optimize()

Emmanuel Bernard (JIRA) noreply at atlassian.com
Thu Feb 22 22:45:33 EST 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-11?page=all ]

Emmanuel Bernard moved ANN-495 to HSEARCH-11:
---------------------------------------------

    Fix Version:     (was: 3.3.0.Alpha1)
      Component:     (was: search)
            Key: HSEARCH-11  (was: ANN-495)
        Project: Hibernate Search  (was: Hibernate Annotations)

> Provide access to IndexWriter.optimize()
> ----------------------------------------
>
>          Key: HSEARCH-11
>          URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-11
>      Project: Hibernate Search
>         Type: New Feature

>     Reporter: Emmanuel Bernard

>
>
> The problem is not solved "automatically" yet. But here is the reason why.
> First of all, the elements are properly deleted, and the index file reflect that as soon as IndexReader.close() is called (which is done by Hibernate Search). However, the files containing the document data are not cleaned.
> Basically, to physically delete the elements, you need to optimize() your index, this operation typically takes more time and doing it for every single delete is not appropriate.
> I see 4 solutions:
>  1. let the user access the Directory and call the indexWriter.optimize() method. It works today but it sucks.
>  2. add an FullTextSession.optimize(Class) method, and the application is responsible for the method trigger. This is the easy solution but put more work on the user. And I'm not happy to push a maintenance API to the Session. Esp since this is more of a SessionFactory like API.
>  2bis. publish this API through JMX
>  3. optimize every N operations. It is trivial to add a counter per DirectoryProvider and trigger the optimization. N should be customizable
>  4. optimize every N seconds. either by setting a timer in an additional thread or wait for the next operation and compare the timestamp
> 2(bis or not) and 3 are my favorites. It's really 2 or 3 hours of work. If someone is interested, ping me.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira




More information about the hibernate-issues mailing list