lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carmit Sahar <carmi...@gmail.com>
Subject Weird document equals and hash through IndexReader & IndexSearcher
Date Thu, 04 Nov 2010 08:27:25 GMT
Hi,

I have a weird result:
If I access the same document through the IndexReader or IndexSearcher, they
are not equal and have different hash values:

                Document doc1 = indexSearcher.doc(i);
                Document doc2 = indexSearcher.getIndexReader().document(i);
                System.out.println("    Equal: " + doc1.equals(doc2) + ",
Hash: " + doc1.hashCode() + ", " + doc2.hashCode() + ", num:" + i);

I'm using Lucene 3.0.2
(No multithreads, nobody is simultaneously updating the index)
What am I missing?
Thanks
Carmit
(Could you please forward your answers to my private address as well?)

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