Package org.apache.lucene.tests.index
Class RandomCodec
java.lang.Object
org.apache.lucene.codecs.Codec
org.apache.lucene.codecs.FilterCodec
org.apache.lucene.tests.codecs.asserting.AssertingCodec
org.apache.lucene.tests.index.RandomCodec
- All Implemented Interfaces:
NamedSPILoader.NamedSPI
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.
-
Field Summary
Modifier and TypeFieldDescriptionunique set of docvalues format names this codec knows aboutunique set of format names this codec knows aboutFields inherited from class org.apache.lucene.codecs.FilterCodec
delegate
-
Constructor Summary
ConstructorDescriptionRandomCodec
(Random random) RandomCodec
(Random random, Set<String> avoidCodecs) -
Method Summary
Modifier and TypeMethodDescriptionReturns the docvalues format that should be used for writing new segments offield
.Returns the postings format that should be used for writing new segments offield
.toString()
Methods inherited from class org.apache.lucene.tests.codecs.asserting.AssertingCodec
docValuesFormat, getKnnVectorsFormatForField, knnVectorsFormat, liveDocsFormat, normsFormat, postingsFormat, storedFieldsFormat, termVectorsFormat
Methods inherited from class org.apache.lucene.codecs.FilterCodec
compoundFormat, fieldInfosFormat, segmentInfoFormat
Methods inherited from class org.apache.lucene.codecs.Codec
availableCodecs, forName, getDefault, getName, reloadCodecs, setDefault
-
Field Details
-
formatNames
unique set of format names this codec knows about -
dvFormatNames
unique set of docvalues format names this codec knows about -
avoidCodecs
-
-
Constructor Details
-
RandomCodec
-
RandomCodec
-
-
Method Details
-
pointsFormat
- Overrides:
pointsFormat
in classAssertingCodec
-
getPostingsFormatForField
Description copied from class:AssertingCodec
Returns the postings format that should be used for writing new segments offield
.The default implementation always returns "Asserting"
- Overrides:
getPostingsFormatForField
in classAssertingCodec
-
getDocValuesFormatForField
Description copied from class:AssertingCodec
Returns the docvalues format that should be used for writing new segments offield
.The default implementation always returns "Asserting"
- Overrides:
getDocValuesFormatForField
in classAssertingCodec
-
toString
- Overrides:
toString
in classAssertingCodec
-