lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markharw00d <>
Subject Re: How can we know if 2 lucene indexes are same?
Date Fri, 05 Sep 2008 18:57:42 GMT

> I think this could be a generally useful feature?
+1. I could definitely use a "commitUserData" option for the same reasons.

> Thinking more on this, we may not need to modify the index format at all for
> this use-case. This is easily achieved in the current system by adding a
> dummy document which Solr can read/write -- not very elegant but it can work

I thought about this but was uncomfortable with the idea of adding an 
extra doc - some use cases that become troublesome for any application 
logic are:
1) IndexReader.numDocs/IndexReader.maxDoc will give "incorrect" values
2) Any queries of the type "all documents *without* a value for field X 
return the commit.userdata document.

I was toying with the idea of maintaining my own commit.userdata file 
which I would manage in my framework when calling IndexWriter.commit but 
this does not feel as clean as Lucene core code holding the user data in 
the segments file.


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

View raw message