Example usage for org.apache.lucene.document FieldType equals

List of usage examples for org.apache.lucene.document FieldType equals

Introduction

In this page you can find the example usage for org.apache.lucene.document FieldType equals.

Prototype

@Override
    public boolean equals(Object obj) 

Source Link

Usage

From source file:org.apache.blur.mapreduce.lib.v2.DocumentWritable.java

License:Apache License

private void writeStringField(DataOutput out, StringField stringField) throws IOException {
    FieldType fieldType = stringField.fieldType();
    if (fieldType.equals(StringField.TYPE_STORED)) {
        out.writeBoolean(true);//from www. j  a v  a  2  s.  co  m
    } else if (fieldType.equals(StringField.TYPE_NOT_STORED)) {
        out.writeBoolean(false);
    } else {
        throw new IOException("Non default FieldTypes for StringField not supported.");
    }
    writeString(out, stringField.stringValue());
}