[Yanel-dev] lucene index
Michael Wechner
michael.wechner at wyona.com
Thu Dec 9 15:48:45 CET 2010
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 =
different 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 index 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 <mailto: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(Rep=
ository)
>
> ?
>
> HTH
>
> Michael
>
>
> Thanks,
> Paul
>
>
> -- =
> Yanel-development mailing list Yanel-development at wyona.com
> <mailto: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/bb30b6e6/attachment.htm
More information about the Yanel-development
mailing list