Hi

On Fri, Oct 6, 2017 at 2:33 PM, Alex Deparvu <a...@pfalabs.com> wrote:
> Hi Robert,
>
> You could use the IndexStatsMBean [0] to poll for the indexing status,
> waiting until indexing is completed.
>
Alex, while this would most likely work in simple test scenarios - but
there's a bit of lag between indexing cycle commits updated indexed
data and when the readers(tracker) updates itself to this new index.

> [0]
> https://github.com/stillalex/jackrabbit-oak/blob/trunk/oak-api/src/main/java/org/apache/jackrabbit/oak/api/jmx/IndexStatsMBean.java#L26
>
> On Thu, Oct 5, 2017 at 4:49 PM, Robert Munteanu <romb...@apache.org> wrote:
>
>> In Sling we have some tests which validate that full text search is
>> working. Occasionaly this test times out because the full-text lucene
>> index is not updated and a traversal query is used. More details at
>> [1].
>>
While, I agree, oak doesn't currently have a fool proof way of
providing this data. As a work-around though, what can be done is
commit a simple data and then query (in a loop with some sleep... and
maybe some timeout) until this new data is available. Availability of
indexed data on reader side, while asynchronous, would still follow
chronological order.

>>
>> [1]: https://issues.apache.org/jira/browse/SLING-7169
>>

Thanks,
Vikas

Reply via email to