public class RandomCodec extends Lucene410Codec
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> |
avoidCodecs |
Set<String> |
dvFormatNames
unique set of docvalues format names this codec knows about
|
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 |
|---|---|
DocValuesFormat |
getDocValuesFormatForField(String name)
Returns the docvalues format that should be used for writing
new segments of
field. |
PostingsFormat |
getPostingsFormatForField(String name)
Returns the postings format that should be used for writing
new segments of
field. |
String |
toString()
returns the codec's name.
|
docValuesFormat, fieldInfosFormat, liveDocsFormat, normsFormat, postingsFormat, segmentInfoFormat, storedFieldsFormat, termVectorsFormatavailableCodecs, forName, getDefault, getName, reloadCodecs, setDefaultpublic Set<String> dvFormatNames
public RandomCodec(Random random)
public PostingsFormat getPostingsFormatForField(String name)
Lucene410Codecfield.
The default implementation always returns "Lucene41"getPostingsFormatForField in class Lucene410Codecpublic DocValuesFormat getDocValuesFormatForField(String name)
Lucene410Codecfield.
The default implementation always returns "Lucene410"getDocValuesFormatForField in class Lucene410CodecCopyright © 2000–2021 The Apache Software Foundation. All rights reserved.