From 1e536794952a0911f114b633e6d3c85e97d1e68e Mon Sep 17 00:00:00 2001 From: Bernhard Messer Date: Wed, 29 Dec 2004 21:37:47 +0000 Subject: [PATCH] use the new IndexReader.getFieldNames instead of the deprecated ones. git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150720 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/index/SegmentMerger.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/org/apache/lucene/index/SegmentMerger.java b/src/java/org/apache/lucene/index/SegmentMerger.java index b9402977761..423d631e4a2 100644 --- a/src/java/org/apache/lucene/index/SegmentMerger.java +++ b/src/java/org/apache/lucene/index/SegmentMerger.java @@ -158,12 +158,12 @@ final class SegmentMerger { int docCount = 0; for (int i = 0; i < readers.size(); i++) { IndexReader reader = (IndexReader) readers.elementAt(i); - fieldInfos.addIndexed(reader.getIndexedFieldNames(Field.TermVector.WITH_POSITIONS_OFFSETS), true, true, true); - fieldInfos.addIndexed(reader.getIndexedFieldNames(Field.TermVector.WITH_POSITIONS), true, true, false); - fieldInfos.addIndexed(reader.getIndexedFieldNames(Field.TermVector.WITH_OFFSETS), true, false, true); - fieldInfos.addIndexed(reader.getIndexedFieldNames(Field.TermVector.YES), true, false, false); - fieldInfos.addIndexed(reader.getIndexedFieldNames(Field.TermVector.NO), false, false, false); - fieldInfos.add(reader.getFieldNames(false), false); + fieldInfos.addIndexed(reader.getFieldNames(IndexReader.FieldOption.TERMVECTOR_WITH_POSITION_OFFSET), true, true, true); + fieldInfos.addIndexed(reader.getFieldNames(IndexReader.FieldOption.TERMVECTOR_WITH_POSITION), true, true, false); + fieldInfos.addIndexed(reader.getFieldNames(IndexReader.FieldOption.TERMVECTOR_WITH_OFFSET), true, false, true); + fieldInfos.addIndexed(reader.getFieldNames(IndexReader.FieldOption.TERMVECTOR), true, false, false); + fieldInfos.addIndexed(reader.getFieldNames(IndexReader.FieldOption.INDEXED), false, false, false); + fieldInfos.add(reader.getFieldNames(IndexReader.FieldOption.UNINDEXED), false); } fieldInfos.write(directory, segment + ".fnm");