[hibernate-dev] Lucene-suggest

Sanne Grinovero sanne at hibernate.org
Tue Feb 24 06:51:36 EST 2015


Hi Marc,
I didn't run any real performance test with it myself yet, but what
I'm understood from other Lucene users is that with the finite state
machine approach for auto-suggestion, the "index" (more appropriately
the state machine) isn't suited for real-time rebuilding.

We'll have to create a method which can rebuild it on demand -
similarly to the MassIndexer.
I expect it to take much less time as it wouldn't need to literally
reload all of your database, but still it might take some minutes so
not something that we should do on a per-commit operation.

Maybe we could do it in background, on a fixed periodicity. I'd prefer
to delegate such cron jobs to user's coding responsbility (which could
be our first implementation step), but there might be some additional
optimisations which we could do when controlling the process.

I'm thinking of:
 - disable it when running the MassIndexer
 - automatically run it at end of MassIndexer
 - disable a timed event if there have been no changes during the period

Would you see a use for it be "guaranteed" to be always in synch,
synchronously, even if it took you - say - 2 minutes of intense CPU
and IO operations to build?

Sanne


On 23 February 2015 at 21:28, Marc Schipperheyn
<m.schipperheyn at gmail.com> wrote:
> Lucene 4.x offers some interesting new functionality with regards to
> autosuggest and google style suggestions.
>
> As part of this functionality, as I understand it, the suggester builds a
> separate index based on the available data with a specific .build()
> function.
>
> I'm assuming that this separate index would not be automatically updated
> when an index record is created through HSEARCH and I'm wondering what
> would be the best way to go about this.
>
> Any suggestions? It would seem that the build step should be executed
> through a FullTextEventListener (not sure how to sue that these days). But
> obviously during a MassIndexer operation, you would only want to execute
> after the entire process completes.
>
> Marc
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev


More information about the hibernate-dev mailing list