[Yanel-dev] lucene index

Balz Schreier balz.schreier at gmail.com
Thu Dec 9 16:05:35 CET 2010


Hi Michael,

yes correctly: data is the same, but index has another directory.

The issue I'm facing is that as soon as two JVMs are accessing the same
index directory, the index gets corrupt (IndexCorruptException -9).
I assume that if I would start the reindexing task within the same JVM, no
such problems would occur (but then the actual application is impacted as
the reindexer consumes a lot of performance).

Cheers
Balz

On Thu, Dec 9, 2010 at 3:48 PM, Michael Wechner
<michael.wechner at wyona.com>wrote:

>  Hi Balz
>
>
> On 12/9/10 3:31 PM, Balz Schreier wrote:
>
> Hi,
> my experience is the following:
> If you delete the index (e.g. the parent folder of "fulltext" and
> "properties") and you do a query right after the delete, it just does not
> find anything anymore (no results).
> But if you edit a content item (controlled via resource), the item gets
> indexed again.
> The same applies for NEW items. But all the items that were in the index
> before the deletion, they are gone.
>
>  I use the indexRepository() method mentioned by Michi, but slightly
> customized:
> - I wrote a subclass of the original reindexer class which takes a data
> repository xml as argument. This way you can build a new index in parallel
> to the existing one.
>
>
>
> you mean you are accessing the same data, but save the index at a differe=
nt
> location?
>
>
>  The advantage is that your site can continue to run while the index gets
> built (with more than 1 Mio items it can take hours...). Once the new ind=
ex
> has been built, you can swap it (stop app, swap index, start app).
>
>
> AFAIK one should be able to re-index and run the webapp at the same time,
> or rather what problems
> did you encounter that you are doing it this way?
>
> Thanks
>
> Michael
>
>
>  Cheers
> Balz
>
> On Thu, Dec 9, 2010 at 3:20 PM, Michael Wechner <michael.wechner at wyona.com
> > wrote:
>
>> Hi Paul
>>
>>
>> On 12/9/10 3:00 PM, Paul Bakker wrote:
>>
>>> Hi,
>>>
>>> Can somebody tell me what will happen if I delete the lucene index from
>>> my realm?
>>> Will it get rebuilt somehow?
>>>
>>
>>  yes, but only incrementally, whereas IIRC the searcher will throw an
>> exception if no index exists yet, hence
>> if you delete the index and search right away, then you will receive an
>> error, whereas if you delete the index, modify some data and then search=
 you
>> will be fine.
>>
>> But I guess you are rather looking for something like
>>
>>
>> src/core/java/org/wyona/yarep/util/YarepUtil.java#indexRepository(Reposi=
tory)
>>
>> ?
>>
>> HTH
>>
>> Michael
>>
>>>
>>> Thanks,
>>> Paul
>>>
>>
>> --
>> Yanel-development mailing list Yanel-development at wyona.com
>> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>>
>
>
>
> --
> Yanel-development mailing list Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wyona.org/pipermail/yanel-development/attachments/2010120=
9/8799beaa/attachment-0001.htm


More information about the Yanel-development mailing list