lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nilesh Vijaywargiay <>
Subject using ParallelReader to update a document
Date Tue, 19 Oct 2010 17:34:45 GMT
I am trying to find a work around for updating fields and in turn the
documents in the original index.

I am using parallel reader and providing it two index, the second index
being the first to be seen by parallel reader.  The second index has same
number of documents as first index[in this case, 2]. But the documents in
second index are empty, except the document which I want to update, here

I am getting a miss if I search for, "Value4 in Document2" because I updated
that field in index 2. This is exactly what I want.
I am getting a hit for "*(**Modified Value of Field4**) AND NOT (V**alue4 in
Document2**)". *This is again what I want.
So I see that query with multiple fields are producing the result. Does this
provide a illusion of updating a document?
*When would this approach break?*
            Document doc1 =new Document();
            addField(doc1, "Field1","Value1 in Document1");
            addField(doc1, "Field2","Value2 in Document1");

            Document doc2 = new Document();
            addField(doc2, "Field4","Value4 in Document2");
            addField(doc2,"Field3","Value3 in Document2");

            Document doc1 =new Document();
            Document doc2 = new Document();
            addField(doc2,"Field4", "Modified Value of Field4");

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