List of usage examples for org.apache.lucene.document StringField fieldType
@Override
public IndexableFieldType fieldType()
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);/* w w w .java 2s.c om*/ } 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()); }