lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor Hadianto" <vic...@hadianto.net>
Subject Re: Lucene refresh index function (incremental indexing).
Date Mon, 24 Nov 2003 09:13:19 GMT
> 1) I compile all the files in a particular directory using the command:
> java org.apache.lucene.demo.IndexHTML -create -index c:\\index ..
> , putting all the indexed files in c:\\index.
> 2) Everytime, I added an additional file in that directory. I need to
> reindex/recompile that directory to generate the indexes again. As the
directory
> gets larger, the indexing takes a longer time.
>
> My question is how do I generate the indexes automatically everytime a new
> document is added in that directory without me recompiling everytime
manually?

You can't, unless you write your own application that monitor the directory
for a new document added. This application then will just index that new
document withouth reindexing the entire document set.

If you do incremental indexing, the indexing does take longer as the
document base grows, but you shouldn't really have this problem until your
index size reached hundreds of megabytes.


victor


>
> -----Original Message-----
> From: Victor Hadianto [mailto:vichad@hadianto.net]
> Sent: Monday, November 24, 2003 1:07 PM
> To: Lucene Users List
> Subject: Re: Lucene refresh index function (incremental indexing).
>
> Ah .. ic,
>
> But you don't need to do that even if you can do it. Lucene does
incremental
> indexing. So you would create a new program to add your document manually
using
> IndexWriter, not blatting the index and doing it again.
>
> Seems like you just trying out Lucene, I suggest having a look in the
source
> code of IndexHTML and you will see that there is no magic there, it just
> traverse the directory and index the HTML file one by one using
IndexWriter.
>
> BTW you don't compile directory using Lucene .. :)
>
> /victor
>
> ----- Original Message -----
> From: "Tun Lin" <chentun@singnet.com.sg>
> To: "'Lucene Users List'" <lucene-user@jakarta.apache.org>
> Sent: Monday, November 24, 2003 3:45 PM
> Subject: RE: Lucene refresh index function (incremental indexing).
>
>
> > Hi,
> >
> > Thanks for your reply.
> >
> > What if I add a new document into the directory that I have compiled
using
> the
> > following command: java org.apache.lucene.demo.IndexHTML -create -index
> > {index-dir} ..
> >
> > Will it automatically reindex like I did manually to reflect the new
> document
> > being added in that particular directory?
> >
> > Please advise.
> >
> > -----Original Message-----
> > From: Victor Hadianto [mailto:vichad@hadianto.net]
> > Sent: Monday, November 24, 2003 12:36 PM
> > To: Lucene Users List
> > Subject: Re: Lucene refresh index function (incremental indexing).
> >
> > > I delete the old ones and add them again manually. But how do I
> > > reindex
> > the
> > > documents automatically without doing it manually?
> >
> > You don't need to reindex the documents again. Lucene does incremental
> indexing.
> > Just add your document to the index and that's it. You need to create a
> new
> > IndexSearcher to reflect the new changes into the your search result.
> >
> > /victor
> >
> >
> > >
> > > -----Original Message-----
> > > From: Dror Matalon [mailto:dror@zapatec.com]
> > > Sent: Sunday, November 23, 2003 4:44 AM
> > > To: Lucene Users List
> > > Subject: Re: Lucene refresh index function (incremental indexing).
> > >
> > > Hi,
> > >
> > > It's not clear what you mean when you say "refresh indexes"  or
> > "re-compiling."
> > > If you're adding new documents just use the add() method. If you are
> > replacing
> > > documents, you need to first delete the old ones and then add them
> again.
> > Look
> > > at the mailing list archive for this, since it's been discussed
> > > several
> > times.
> > >
> > >
> > > On Sun, Nov 23, 2003 at 12:22:40AM +0800, Tun Lin wrote:
> > > > Hi,
> > > >
> > > > I am new here.
> > > >
> > > > May I know how to refresh indexes in Lucene immediately after new
> > > > documents have been added without re-compiling again to reindex the
> > > > documents in that particular directory?
> > > >
> > > > Thanks.
> > >
> > > --
> > > Dror Matalon
> > > Zapatec Inc
> > > 1700 MLK Way
> > > Berkeley, CA 94709
> > > http://www.fastbuzz.com
> > > http://www.zapatec.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org


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


Mime
View raw message