lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Condit <>
Subject best practice for reusing documents with multi-valued fields
Date Fri, 15 Apr 2011 01:02:56 GMT
I know that it's best practice to reuse the Document object when
indexing, but I'm curious how multi-valued fields affect this. I tried
this before indexing each document:

for (String fieldName: fieldNames) {
  Field field= doc.getField(field);
  if (null != field) {
  } else {
    System.out.println("null field");

And it seems that the null fields (which I had removed) are just
accumulating. Is there a better way to reuse a document with
multi-valued fields?


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

View raw message