Example usage for org.apache.lucene.index SegmentInfo getAttribute

List of usage examples for org.apache.lucene.index SegmentInfo getAttribute

Introduction

In this page you can find the example usage for org.apache.lucene.index SegmentInfo getAttribute.

Prototype

public String getAttribute(String key) 

Source Link

Document

Get a codec attribute value, or null if it does not exist

Usage

From source file:org.apache.blur.lucene.codec.Blur022StoredFieldsFormat.java

License:Apache License

private CompressionMode getCompressionMode(SegmentInfo si) {
    String attribute = si.getAttribute(STORED_FIELDS_FORMAT_COMPRESSION_MODE);
    if (HIGH_COMPRESSION.equals(attribute)) {
        return CompressionMode.HIGH_COMPRESSION;
    } else if (FAST.equals(attribute)) {
        return CompressionMode.FAST;
    } else if (FAST_DECOMPRESSION.equals(attribute)) {
        return CompressionMode.FAST_DECOMPRESSION;
    }//from   ww w .  j  a v  a 2 s  . c  om
    // This happen during nrt udpates.
    return _compressionMode;
}