lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikko Noromaa" <mi...@noromaa.fi>
Subject RE: How do I avoid reindexing?
Date Sun, 11 Sep 2005 09:07:30 GMT
Hi,

> delete document with this id and then add document with the same id.

Yes, this is clearly the way to go. I implemented a similar application
myself. However, earlier I stored my ID as a binary field to save space,
because I only ever needed to read the value from a found document. With the
update logic added, I had to store the ID as text so that Lucene can search
for the document to delete.

This was annoying because in my application updates are very rare, but the
possibility must be there. Storing numbers as text doesn't sound like
something a modern application does.

So, if it hasn't been asked for before, here comes: It would be nice if
Lucene could search by binary fields.

--

Mikko Noromaa (mikko@noromaa.fi) - tel. +358 40 7348034
Noromaa Solutions - see http://www.nm-sol.com/
 

> -----Original Message-----
> From: jian chen [mailto:chenjian1227@gmail.com] 
> Sent: Sunday, September 11, 2005 2:24 AM
> To: java-user@lucene.apache.org
> Subject: Re: How do I avoid reindexing?
> 
> 
> delete document with this id and then add document with the same id.
> 
> Jian
> 
> On 9/10/05, Filip Anselm <filip@nable.dk> wrote:
> > 
> > ...well the title says it all
> > 
> > I index some documents - all with the same fields... One of 
> the fields,
> > "id" is unique for the indexed documents. If i try to index 
> a document
> > with an id, that is already indexed - the old document 
> should be updated
> > or replaced with the new document, so that I avoid indexed documents
> > with the same id. How is the best way to do this?
> > 
> > thanks
> > 
> > - Filip
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: java-user-help@lucene.apache.org
> > 
> >
> 


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


Mime
View raw message