org.apache.lucene.index
Class RandomCodec
java.lang.Object
org.apache.lucene.codecs.Codec
org.apache.lucene.codecs.lucene46.Lucene46Codec
org.apache.lucene.index.RandomCodec
- All Implemented Interfaces:
- NamedSPILoader.NamedSPI
public class RandomCodec
- extends Lucene46Codec
Codec that assigns per-field random postings formats.
The same field/format assignment will happen regardless of order,
a hash is computed up front that determines the mapping.
This means fields can be put into things like HashSets and added to
documents in different orders and the test will still be deterministic
and reproducable.
formatNames
public Set<String> formatNames
- unique set of format names this codec knows about
dvFormatNames
public Set<String> dvFormatNames
- unique set of docvalues format names this codec knows about
RandomCodec
public RandomCodec(Random random,
Set<String> avoidCodecs)
RandomCodec
public RandomCodec(Random random)
getPostingsFormatForField
public PostingsFormat getPostingsFormatForField(String name)
- Overrides:
getPostingsFormatForField
in class Lucene46Codec
getDocValuesFormatForField
public DocValuesFormat getDocValuesFormatForField(String name)
- Overrides:
getDocValuesFormatForField
in class Lucene46Codec
toString
public String toString()
- Overrides:
toString
in class Codec
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.