Re: How to add DocValues Field to a document in an optimal manner.

2012-03-01 Thread Michael McCandless
You shouldn't use doc.removeField -- it's costly (the fields are a list internally so we walk that list looking for which field(s) to remove). To reuse you can just use Field.setValue, and leave the Field instance on the Document. But: you should only do this if you really have a meaningful perfo

Re: How to add DocValues Field to a document in an optimal manner.

2012-02-29 Thread Trejkaz
On Thu, Mar 1, 2012 at 6:20 PM, Sudarshan Gaikaiwari wrote: > Hi > > https://builds.apache.org/job/Lucene-trunk/javadoc/core/org/apache/lucene/document/DocValuesField.html > > The documentation at the above link indicates that the optimal way to > add a DocValues field is to create it once and cha

How to add DocValues Field to a document in an optimal manner.

2012-02-29 Thread Sudarshan Gaikaiwari
Hi https://builds.apache.org/job/Lucene-trunk/javadoc/core/org/apache/lucene/document/DocValuesField.html The documentation at the above link indicates that the optimal way to add a DocValues field is to create it once and change the value as we are indexing multiple documents. It also mentions t