diff --git a/zoie-core/src/main/java/proj/zoie/api/ZoieSegmentReader.java b/zoie-core/src/main/java/proj/zoie/api/ZoieSegmentReader.java index e5ca2b94..8ed11034 100644 --- a/zoie-core/src/main/java/proj/zoie/api/ZoieSegmentReader.java +++ b/zoie-core/src/main/java/proj/zoie/api/ZoieSegmentReader.java @@ -22,6 +22,8 @@ import java.io.IOException; import java.util.Arrays; +import java.util.Collections; +import java.util.Set; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; @@ -158,8 +160,10 @@ public R getDecoratedReader() { return _decoratedReader; } + public final Set DOCUMENT_STORE_FIELD_SET = Collections.singleton(AbstractZoieIndexable.DOCUMENT_STORE_FIELD); + public BytesRef getStoredValue(int docid) throws IOException { - Document doc = in.document(docid); + Document doc = in.document(docid, DOCUMENT_STORE_FIELD_SET); if (doc != null) { return doc.getBinaryValue(AbstractZoieIndexable.DOCUMENT_STORE_FIELD); }