lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jong Kim <jong.luc...@gmail.com>
Subject Lucene's internal doc ID space
Date Fri, 11 May 2012 11:56:22 GMT
When I update a document in Lucene (i.e., re-indexing), I have to delete
the existing document, and create a new one. My understanding is that this
assigns a new doc ID for the newly created document. If that is the case,
is it true that the system can rather quickly run out of doc ID space
(which is about 2 billion since doc ID data type is integer) if the update
frequency is extremly high in an application?

So, my question is -

1. Does Lucene always increment the doc ID for newly created document
(hence, the risk of running out of ID space) just like auto increment
column in the database does? Or does it re-use the numbers that are
currently not in use (i.e. those IDs that were once assigned but since
deleted)?

2. If Lucene can recycle old IDs, it would be even better if I could force
it to re-use a particular doc ID when updating a document by deleting old
one and creating new one. This scheme will allow me to reference this doc
ID from another doc in the index as if it was a foreign key value that
doesn't change upon reindexing. I didn't see anything like this in the API,
but is it ever possible?

3. If Lucene does not recycle old IDs, how do people deal with this issue
when designing a system with extremely high re-indexing frequency?

Thanks in advance for help
/Jong

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message