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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to