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
FieldsModifier 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
ConstructorsConstructorDescriptionRandomCodec(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, termVectorsFormatMethods inherited from class org.apache.lucene.codecs.FilterCodec
compoundFormat, fieldInfosFormat, segmentInfoFormatMethods 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:
pointsFormatin classAssertingCodec
-
getPostingsFormatForField
Description copied from class:AssertingCodecReturns the postings format that should be used for writing new segments offield.The default implementation always returns "Asserting"
- Overrides:
getPostingsFormatForFieldin classAssertingCodec
-
getDocValuesFormatForField
Description copied from class:AssertingCodecReturns the docvalues format that should be used for writing new segments offield.The default implementation always returns "Asserting"
- Overrides:
getDocValuesFormatForFieldin classAssertingCodec
-
toString
- Overrides:
toStringin classAssertingCodec
-