mirror of https://github.com/apache/lucene.git
nuke unnecessary FIS method (only used by this one test)
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene4547@1440842 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8c8c906d2b
commit
fddc40fcc0
|
@ -275,24 +275,6 @@ public class FieldInfos implements Iterable<FieldInfo> {
|
|||
byName.put(fi.name, fi);
|
||||
}
|
||||
|
||||
/** If the field is not yet known, adds it. If it is known, checks to make
|
||||
* sure that the isIndexed flag is the same as was given previously for this
|
||||
* field. If not - marks it as being indexed. Same goes for the TermVector
|
||||
* parameters.
|
||||
*
|
||||
* @param name The name of the field
|
||||
* @param isIndexed true if the field is indexed
|
||||
* @param storeTermVector true if the term vector should be stored
|
||||
* @param omitNorms true if the norms for the indexed field should be omitted
|
||||
* @param storePayloads true if payloads should be stored for this field
|
||||
* @param indexOptions if term freqs should be omitted for this field
|
||||
*/
|
||||
// TODO: fix testCodecs to do this another way, its the only user of this
|
||||
FieldInfo addOrUpdate(String name, boolean isIndexed, boolean storeTermVector,
|
||||
boolean omitNorms, boolean storePayloads, IndexOptions indexOptions, DocValuesType docValues, DocValuesType normType) {
|
||||
return addOrUpdateInternal(name, -1, isIndexed, storeTermVector, omitNorms, storePayloads, indexOptions, docValues, normType);
|
||||
}
|
||||
|
||||
/** NOTE: this method does not carry over termVector
|
||||
* booleans nor docValuesType; the indexer chain
|
||||
* (TermVectorsConsumerPerField, DocFieldProcessor) must
|
||||
|
|
|
@ -36,6 +36,7 @@ import org.apache.lucene.document.Field.Store;
|
|||
import org.apache.lucene.document.FieldType;
|
||||
import org.apache.lucene.document.StringField;
|
||||
import org.apache.lucene.document.TextField;
|
||||
import org.apache.lucene.index.FieldInfo.DocValuesType;
|
||||
import org.apache.lucene.index.FieldInfo.IndexOptions;
|
||||
import org.apache.lucene.search.DocIdSetIterator;
|
||||
import org.apache.lucene.search.IndexSearcher;
|
||||
|
@ -94,8 +95,41 @@ public class TestCodecs extends LuceneTestCase {
|
|||
this.omitTF = omitTF;
|
||||
this.storePayloads = storePayloads;
|
||||
// TODO: change this test to use all three
|
||||
fieldInfos.addOrUpdate(name, true, false, false, storePayloads, omitTF ? IndexOptions.DOCS_ONLY : IndexOptions.DOCS_AND_FREQS_AND_POSITIONS, null, null);
|
||||
fieldInfo = fieldInfos.fieldInfo(name);
|
||||
fieldInfo = fieldInfos.addOrUpdate(name, new IndexableFieldType() {
|
||||
|
||||
@Override
|
||||
public boolean indexed() { return true; }
|
||||
|
||||
@Override
|
||||
public boolean stored() { return false; }
|
||||
|
||||
@Override
|
||||
public boolean tokenized() { return false; }
|
||||
|
||||
@Override
|
||||
public boolean storeTermVectors() { return false; }
|
||||
|
||||
@Override
|
||||
public boolean storeTermVectorOffsets() { return false; }
|
||||
|
||||
@Override
|
||||
public boolean storeTermVectorPositions() { return false; }
|
||||
|
||||
@Override
|
||||
public boolean storeTermVectorPayloads() { return false; }
|
||||
|
||||
@Override
|
||||
public boolean omitNorms() { return false; }
|
||||
|
||||
@Override
|
||||
public IndexOptions indexOptions() { return omitTF ? IndexOptions.DOCS_ONLY : IndexOptions.DOCS_AND_FREQS_AND_POSITIONS; }
|
||||
|
||||
@Override
|
||||
public DocValuesType docValueType() { return null; }
|
||||
});
|
||||
if (storePayloads) {
|
||||
fieldInfo.setStorePayloads();
|
||||
}
|
||||
this.terms = terms;
|
||||
for(int i=0;i<terms.length;i++)
|
||||
terms[i].field = this;
|
||||
|
|
Loading…
Reference in New Issue