public class RandomCodec extends AssertingCodec
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
|
delegate| 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. |
PointsFormat |
pointsFormat() |
String |
toString() |
docValuesFormat, liveDocsFormat, normsFormat, postingsFormat, storedFieldsFormat, termVectorsFormatcompoundFormat, fieldInfosFormat, segmentInfoFormatavailableCodecs, forName, getDefault, getName, reloadCodecs, setDefaultpublic Set<String> dvFormatNames
public RandomCodec(Random random)
public PointsFormat pointsFormat()
pointsFormat in class AssertingCodecpublic PostingsFormat getPostingsFormatForField(String name)
AssertingCodecfield.
The default implementation always returns "Asserting"getPostingsFormatForField in class AssertingCodecpublic DocValuesFormat getDocValuesFormatForField(String name)
AssertingCodecfield.
The default implementation always returns "Asserting"getDocValuesFormatForField in class AssertingCodecpublic String toString()
toString in class AssertingCodecCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.