jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@adobe.com>
Subject Re: Querying recently created data returns empty result
Date Fri, 23 Dec 2011 22:25:18 GMT
On 23.12.11 16:45, "Pontus Amberg" <pontus.amberg@milso.se> wrote:
>I have some code in EJB:s where data is imported from a legacy system
>into a JCA instance of Jackrabbit. There's multiple methods in the EJB
>that perform small parts of the import and most methods are using a
>transaction of their own. Since this is EJB 3 stuff the transactions are
>controlled with annotations on the methods.
>Most of the stuff seems to work fine but some methods try to query data
>imported by other methods using for example:
>select * from [nt:unstructured] as n where n.type='abc' and n.id='123456'
>and they return an empty result even if the methods importing the data
>seems to have succeeded. Is this normal behavior since the Lucene index
>needs some time to be updated or might there be somthing wrong with our
>code (transaction or session handling)?

The search index should be updated once the JCR session is saved (that is
per spec - only full text indexing of binary data might get updated with a
delay). When using transactions, the actual persistence is moved from the
session save to the transaction commit, and I think that holds true for
the search index update as well.


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

View raw message