Michael
Thanks for the clarification.
This is a hefty limitation of the Lucene.
One would expect, that you would be able to update a specific field in
the index without having to reindex the entire document.
Regards
Jamie
On 2014/05/16, 11:34 PM, Michael McCandless wrote:
You can
I know, it's a commonly requested feature, but unfortunately it's very
complex to implement. See e.g. the discussions on
https://issues.apache.org/jira/browse/LUCENE-4258
Mike McCandless
http://blog.mikemccandless.com
On Mon, May 19, 2014 at 5:15 AM, Jamie ja...@mailarchiva.com wrote:
Users
Subject: Re: writer.updateDocument() not working (possible bug?)
I know, it's a commonly requested feature, but unfortunately it's very
complex to implement. See e.g. the discussions on
https://issues.apache.org/jira/browse/LUCENE-4258
Mike McCandless
http://blog.mikemccandless.com
reader.document(i) and searcher.doc(i) do the same thing: retrieve the
stored fields.
But neither method fully preserves indexing information; e.g., boosts
are lost, details about how the field was indexed (e.g., DOCS_ONLY,
et.c) are lost, etc.
You can use the returned document to provide the
Michael
How do you update a document that resides in the index without having
the original document?
Jamie
On 2014/05/13, 3:30 PM, Michael McCandless wrote:
How did you produce the document that you are sending to
updateDocument? Are you loading it from IndexReader.document() or
You can retrieve the raw content for each field (assuming you stored it).
But then you must re-generate a Document from the raw content
yourself, as you did originally.
Ie you cannot rely on Lucene to remember schema-like things like
boost, the FieldType (how the postings were indexed, whether
Greetings
I am using Lucene NRT search. After calling writer.updateDocument(term,
doc) and then search(), the document is no longer visible in the search
results. The program must be restarted to see it again. In addition, the
update is not being applied. The original document (before the
How did you produce the document that you are sending to
updateDocument? Are you loading it from IndexReader.document() or
IndexSearcher.doc(), changing it, then passing that to
IW.updateDocument? If so, that's probably your bug: a loaded document
is not identical to the original Document you
Mike
Thanks for the tip. The doc was being loaded using the method
searcher.doc(scoreDoc.doc,getLoadFields()). Obviously, only a minority
of fields were being loaded. However, when using the method
searcher.doc(scoreDoc.doc), the doc appears to update when
updateDocument(term,doc) is called.