> On 7/27/06, Andreas Hartmann <[EMAIL PROTECTED]> wrote:
>> Andreas Hartmann wrote:
>> > Hi Lenya devs,
>> >
>> > I'm currently writing a test which checks if the index has been
>> > updated when a document was changed.
>> >
>> > How can I do this from Java (do a search, or check the index for
>> > a certain document)?
>>
>> I guess the easiest way is to issue a search:
>>
>> cocoon://modules/lucene/search.xml?queryString=...
>>
>> I'll try this and ask again if it doesn't work.
>>
>> -- Andreas
>
> How about checking the last modified date of:
> {pub}/work/search/lucene/index/live/index/segments
> ? Check if it changes with an incremental update.
Thanks for the hint, but we shouldn't base our code on Lucene internals.
The code will break e.g. when a DB is used to store the index, or if it
is stored on a different machine. We would at least have to encapsulate
this and make it configurable, but I think there should be a more direct
way.
-- Andreas
--------------------------------------------------------------
Andreas Hartmann [EMAIL PROTECTED] +41 1 272 9161
Wyona AG, Hardstrasse 219, CH-8005 Zurich
Open Source CMS http://www.wyona.org http://www.wyona.com
--------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]