lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nader S. Henein" <>
Subject RE: Documents the same search is done many times.
Date Thu, 29 Apr 2004 06:08:34 GMT

The short answer is, it's up to you :-)  Lucene doesn't know which document
is your primary key (you're thinking like a DB programmer) id you ad the new
document with ID="one" without deleting the old one from the index then when
you search you'll get two documents "pig" and "mongoose" but if you delete
all documents with ID="one" then index you're new document then you'll only
get "mongoose", From a DBA perspective Lucene is like a table with a unique
ID on each document (that being the Lucene assigned DOC ID (which changes
every time you optimize, but nevertheless remains unique) and then all other
columns weather indexed, tokenized, stored or not, can bare repetition, so
if you want to implement a unique key like ID on your Lucene index, you 'll
have to do a little delete based on that ID field every time you insert a
new document into the index, quite simple and I've been doing it or a few
years now without fail.

Hope this helps

Nader Henein

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message