You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Michael Wechner <mi...@wyona.com> on 2005/01/11 14:55:46 UTC

Re: Hot update lucene search db

Mann, David wrote:

> Hi all,
> I'm new to lenya and have gotten the lucene engine running, but have 
> noticed that if I try to re-index while the site is running, the 
> search engine files are not updated properly.


actually this should be possible

> Is it required to shut down the app server (just running "lenya 
> servlet" for now) before updating the search, or am I doing something 
> wrong? I also tried "incremental" mode instead of creating a new 
> index, but it didn't seem to help


Incremental doesn't really work properly and it's also kind of useless in
a batch process, because looking for lastmodifieds also comsumes quite a 
lot of resources and doesn't seem to be much faster and building the 
index from scratch.

But incremental indexing for individual documents makes a lot of sense,
but because of performance reasons should be decoupled from the system
itself. Currently this is not the case and one won't notice until one has
a > 100000 documents

> . If I run it offline (after crawling the site) it works fine and 
> picks up all the changes.


as said above this is quite strange. Do the log files say anything 
particular?

>  
> Current env:
> apache-lenya-1.2.1-src
> jdk1.4.2_06
> WindowsXP



Maybe there is a difference between Windows and Linux/UNIX. I just know
how it behaves on Linux/Debian

HTH

Michi

>  
> Update command:
> tools\bin\ant -f build/lenya/webapp/lenya/bin/crawl_and_index.xml 
> -Dlucene.xconf=build/lenya/webapp/lenya/pubs/default/config/search/lucene-live.xconf 
> index
>  
> lucene-live.xconf:
> <lucene>
>   <update-index type="new"/>
> <!--
>   <update-index type="incremental"/>
> -->
>  
>   <index-dir src="../../work/search/lucene/index/live/index"/>
>   <htdocs-dump-dir src="../../work/search/lucene/htdocs_dump/live"/>
>  
>   <indexer class="org.apache.lenya.lucene.index.DefaultIndexer"/>
> </lucene>
>  
> Thanks,
> David
>  



-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@lenya.apache.org
For additional commands, e-mail: user-help@lenya.apache.org