Java Code Examples for org.apache.lucene.codecs.lucene50.Lucene50StoredFieldsFormat

The following examples show how to use org.apache.lucene.codecs.lucene50.Lucene50StoredFieldsFormat. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: lucene-solr   Source File: TestCodecSupport.java    License: Apache License 2.0 5 votes vote down vote up
protected void assertCompressionMode(String expectedModeString, SolrCore core) throws IOException {
  h.getCore().withSearcher(searcher -> {
    SegmentInfos infos = SegmentInfos.readLatestCommit(searcher.getIndexReader().directory());
    SegmentInfo info = infos.info(infos.size() - 1).info;
    assertEquals("Expecting compression mode string to be " + expectedModeString +
            " but got: " + info.getAttribute(Lucene50StoredFieldsFormat.MODE_KEY) +
            "\n SegmentInfo: " + info +
            "\n SegmentInfos: " + infos +
            "\n Codec: " + core.getCodec(),
        expectedModeString, info.getAttribute(Lucene50StoredFieldsFormat.MODE_KEY));
    return null;
  });
}
 
Example 2
public PerFieldMappingPostingFormatCodec(Lucene50StoredFieldsFormat.Mode compressionMode, MapperService mapperService, ESLogger logger) {
    super(compressionMode);
    this.mapperService = mapperService;
    this.logger = logger;
}
 
Example 3
Source Project: lucene-solr   Source File: Lucene86Codec.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * Instantiates a new codec.
 */
public Lucene86Codec() {
  this(Lucene50StoredFieldsFormat.Mode.BEST_SPEED);
}
 
Example 4
Source Project: lucene-solr   Source File: Lucene80Codec.java    License: Apache License 2.0 4 votes vote down vote up
/** 
 * Instantiates a new codec.
 */
public Lucene80Codec() {
  super("Lucene80");
  this.storedFieldsFormat = new Lucene50StoredFieldsFormat();
}
 
Example 5
Source Project: crate   Source File: PerFieldMappingPostingFormatCodec.java    License: Apache License 2.0 4 votes vote down vote up
public PerFieldMappingPostingFormatCodec(Lucene50StoredFieldsFormat.Mode compressionMode, MapperService mapperService, Logger logger) {
    super(compressionMode);
    this.mapperService = mapperService;
    this.logger = logger;
}
 
Example 6
Source Project: lucene-solr   Source File: Lucene86Codec.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Instantiates a new codec, specifying the stored fields compression
 * mode to use.
 * @param mode stored fields compression mode to use for newly
 *             flushed/merged segments.
 */
public Lucene86Codec(Lucene50StoredFieldsFormat.Mode mode) {
  super("Lucene86");
  this.storedFieldsFormat = new Lucene50StoredFieldsFormat(Objects.requireNonNull(mode));
  this.defaultFormat = new Lucene84PostingsFormat();
}
 
Example 7
Source Project: lucene-solr   Source File: Lucene84Codec.java    License: Apache License 2.0 2 votes vote down vote up
/**
 * Instantiates a new codec, specifying the stored fields compression
 * mode to use.
 * @param mode stored fields compression mode to use for newly
 *             flushed/merged segments.
 */
public Lucene84Codec(Mode mode) {
  super("Lucene84");
  this.storedFieldsFormat = new Lucene50StoredFieldsFormat(Objects.requireNonNull(mode));
  this.defaultFormat = new Lucene84PostingsFormat();
}