jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: is doc addition / indexing synchronous or asynchronous?
Date Wed, 04 May 2011 21:23:11 GMT
On 04.05.11 22:38, "Dolan, Kelly" <kdolan@inmedius.com> wrote:
>If I modify SearchManager such that it
>implements EventListener as opposed to SynchronousEventListener indexing
>now occurs
>in a background thread.  If I proceed with such a change, will this break
>anything in Jackrabbit?  i.e., is there any operation that modifies the
>repository, immediately does a search and expects to find what was just
>and if it does not, fails?

I don't know that exact part of the search index implementation to judge
what this change will do, but I think this would break 6.5 "Search Scope"
from the JCR spec [0]:

"A query must search the persistent workspace associated with the current
session. It may take into account pending changes to the persistent
workspace; that is, changes which are either unsaved or, within a
transaction, saved but uncommitted."

That means, as soon save() returns (== persisted), the index should be up
to date. This might be important for certain applications that for example
change something, save it and then run a search again to update the view -
this scenario would be broken and the app would have no information how
long to wait until the search index is up to date.

[0] http://www.day.com/specs/jcr/2.0/6_Query.html#6.5%20Search%20Scope


Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel

View raw message