lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: Indexing
Date Mon, 31 Oct 2005 20:16:48 GMT
: Taking this to java-dev: Since this is such a common issue, would it
: be feasible for Lucene to have some sort of capability to be told
: what field is the unique one and automatically update (delete, and
: add) a document added with a duplicate of a unique field?   This
: would probably require that Lucene enforce this uniqueness during an
: add, though, right?

My vote would be to NOT try and do this internally, instead provide a new
interface with a simplified API that wraps an IndexWriter and an
IndexReader and knows about the primary key field.  A class like this
could also having batch based API, so it could be more efficient in
processing all of the deletes/adds/and "updates" - which is also a big
issue people seem to have questiosn baout when they want to preserve
uniqueness in their index

	"I can't delete with my reader without closing my writer, I can't
	add without closing the reader i just used to delete..."

Perhaps adding functionality like this to "IndexModifier" would make

Or perhaps seperating it out into another abstraction that uses an
IndexModifier for modifications, and maintains a seperate IndexReader it
reuses when doing searches (which is reopened on demand, or periodically
if updates have been made) would be a good way to go.


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

View raw message