if (fi.getIndexOptions() != IndexOptions.NONE) { final String fieldName = fi.name; final String formatName = fi.getAttribute(PER_FIELD_FORMAT_KEY); if (formatName != null) { final String suffix = fi.getAttribute(PER_FIELD_SUFFIX_KEY); if (suffix == null) { throw new IllegalStateException("missing attribute: " + PER_FIELD_SUFFIX_KEY + " for field: " + fieldName);
if (fi.getDocValuesType() != DocValuesType.NONE) { final String fieldName = fi.name; final String formatName = fi.getAttribute(PER_FIELD_FORMAT_KEY); if (formatName != null) { final String suffix = fi.getAttribute(PER_FIELD_SUFFIX_KEY); if (suffix == null) { throw new IllegalStateException("missing attribute: " + PER_FIELD_SUFFIX_KEY + " for field: " + fieldName);
private DocValuesConsumer getInstance(FieldInfo field) throws IOException { DocValuesFormat format = null; if (field.getDocValuesGen() != -1) { final String formatName = field.getAttribute(PER_FIELD_FORMAT_KEY); final String suffixAtt = field.getAttribute(PER_FIELD_SUFFIX_KEY);
/** Returns true if this field has undead norms. */ public static boolean isUndead(FieldInfo fieldInfo) { String isUndead = fieldInfo.getAttribute(LEGACY_UNDEAD_NORMS_KEY); if (isUndead != null) { // Bring undead norms back to life; this is set in Lucene40FieldInfosFormat, to emulate pre-5.0 undead norms assert "true".equals(isUndead); return true; } else { return false; } }
public static boolean isUndeadArmy(FieldInfos fieldInfos) { boolean everythingIsUndead = true; for(FieldInfo fieldInfo : fieldInfos) { if (fieldInfo.hasNorms()) { String isUndead = fieldInfo.getAttribute(LEGACY_UNDEAD_NORMS_KEY); if (isUndead != null) { assert "true".equals(isUndead); } else { everythingIsUndead = false; } } } return everythingIsUndead; }
if (fi.getIndexOptions() != IndexOptions.NONE) { final String fieldName = fi.name; final String formatName = fi.getAttribute(PER_FIELD_FORMAT_KEY); if (formatName != null) { final String suffix = fi.getAttribute(PER_FIELD_SUFFIX_KEY); if (suffix == null) { throw new IllegalStateException("missing attribute: " + PER_FIELD_SUFFIX_KEY + " for field: " + fieldName);
if (fi.getIndexOptions() != IndexOptions.NONE) { final String fieldName = fi.name; final String formatName = fi.getAttribute(PER_FIELD_FORMAT_KEY); if (formatName != null) { final String suffix = fi.getAttribute(PER_FIELD_SUFFIX_KEY); if (suffix == null) { throw new IllegalStateException("missing attribute: " + PER_FIELD_SUFFIX_KEY + " for field: " + fieldName);
if (fi.getIndexOptions() != IndexOptions.NONE) { final String fieldName = fi.name; final String formatName = fi.getAttribute(PER_FIELD_FORMAT_KEY); if (formatName != null) { final String suffix = fi.getAttribute(PER_FIELD_SUFFIX_KEY); if (suffix == null) { throw new IllegalStateException("missing attribute: " + PER_FIELD_SUFFIX_KEY + " for field: " + fieldName);
if (fi.getDocValuesType() != DocValuesType.NONE) { final String fieldName = fi.name; final String formatName = fi.getAttribute(PER_FIELD_FORMAT_KEY); if (formatName != null) { final String suffix = fi.getAttribute(PER_FIELD_SUFFIX_KEY); if (suffix == null) { throw new IllegalStateException("missing attribute: " + PER_FIELD_SUFFIX_KEY + " for field: " + fieldName);
if (fi.getDocValuesType() != DocValuesType.NONE) { final String fieldName = fi.name; final String formatName = fi.getAttribute(PER_FIELD_FORMAT_KEY); if (formatName != null) { final String suffix = fi.getAttribute(PER_FIELD_SUFFIX_KEY); if (suffix == null) { throw new IllegalStateException("missing attribute: " + PER_FIELD_SUFFIX_KEY + " for field: " + fieldName);
if (fi.getDocValuesType() != DocValuesType.NONE) { final String fieldName = fi.name; final String formatName = fi.getAttribute(PER_FIELD_FORMAT_KEY); if (formatName != null) { final String suffix = fi.getAttribute(PER_FIELD_SUFFIX_KEY); if (suffix == null) { throw new IllegalStateException("missing attribute: " + PER_FIELD_SUFFIX_KEY + " for field: " + fieldName);
@Override public synchronized BinaryDocValues getBinary(FieldInfo field) throws IOException { BinaryDocValues instance = binaryInstances.get(field.name); if (instance == null) { switch(LegacyDocValuesType.valueOf(field.getAttribute(legacyKey))) { case BYTES_FIXED_STRAIGHT: instance = loadBytesFixedStraight(field); break; case BYTES_VAR_STRAIGHT: instance = loadBytesVarStraight(field); break; case BYTES_FIXED_DEREF: instance = loadBytesFixedDeref(field); break; case BYTES_VAR_DEREF: instance = loadBytesVarDeref(field); break; default: throw new AssertionError(); } if (!merging) { binaryInstances.put(field.name, instance); } } return instance; }
private DocValuesConsumer getInstance(FieldInfo field) throws IOException { DocValuesFormat format = null; if (field.getDocValuesGen() != -1) { final String formatName = field.getAttribute(PER_FIELD_FORMAT_KEY); final String suffixAtt = field.getAttribute(PER_FIELD_SUFFIX_KEY);
private DocValuesConsumer getInstance(FieldInfo field) throws IOException { DocValuesFormat format = null; if (field.getDocValuesGen() != -1) { final String formatName = field.getAttribute(PER_FIELD_FORMAT_KEY); final String suffixAtt = field.getAttribute(PER_FIELD_SUFFIX_KEY);
private DocValuesConsumer getInstance(FieldInfo field) throws IOException { DocValuesFormat format = null; if (field.getDocValuesGen() != -1) { final String formatName = field.getAttribute(PER_FIELD_FORMAT_KEY); final String suffixAtt = field.getAttribute(PER_FIELD_SUFFIX_KEY);
data = dir.openInput(dataName, state.context); index = dir.openInput(indexName, state.context); switch(LegacyDocValuesType.valueOf(field.getAttribute(legacyKey))) { case BYTES_FIXED_SORTED: instance = loadBytesFixedSorted(field, data, index);
boolean success = false; try { switch(LegacyDocValuesType.valueOf(field.getAttribute(legacyKey))) { case VAR_INTS: instance = loadVarIntsField(field, input);