public class RandomCodec extends Lucene40Codec
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.
Modifier and Type | Field and Description |
---|---|
Set<String> |
formatNames
unique set of format names this codec knows about
|
Constructor and Description |
---|
RandomCodec(Random random) |
RandomCodec(Random random,
Set<String> avoidCodecs) |
Modifier and Type | Method and Description |
---|---|
PostingsFormat |
getPostingsFormatForField(String name) |
String |
toString() |
docValuesFormat, fieldInfosFormat, liveDocsFormat, normsFormat, postingsFormat, segmentInfoFormat, storedFieldsFormat, termVectorsFormat
availableCodecs, forName, getDefault, getName, reloadCodecs, setDefault
public RandomCodec(Random random)
public PostingsFormat getPostingsFormatForField(String name)
getPostingsFormatForField
in class Lucene40Codec
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.