jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pontus Amberg <pontus.amb...@comhem.se>
Subject Re: Querying recently created data returns empty result
Date Sat, 24 Dec 2011 00:20:40 GMT
The nodes we are searching for does not contain binary data and I've 
many different combinations of session saves and transactions commit and
so far the query still fails. I'll take a closer look at it during the 
weekend and
see if I can find a solution.


On 2011-12-23T23:25:18 CET, Alexander Klimetschek wrote:
> 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.
> Cheers,
> Alex

View raw message