private NewIndexType buildWithoutSubfields() { Map<String, Object> hash = new TreeMap<>(); hash.put("type", getFieldType()); hash.put(INDEX, disableSearch ? INDEX_NOT_SEARCHABLE : INDEX_SEARCHABLE); hash.put(NORMS, valueOf(!disableNorms)); hash.put(STORE, valueOf(store)); if (FIELD_TYPE_KEYWORD.equals(getFieldType())) { hash.put("doc_values", valueOf(!disabledDocValues)); } if (getFieldData()) { hash.put(FIELD_FIELDDATA, FIELDDATA_ENABLED); } return indexType.setProperty(fieldName, hash); }
private NewIndexType buildWithSubfields() { Map<String, Object> hash = new TreeMap<>(); hash.put("type", getFieldType()); hash.put(INDEX, disableSearch ? INDEX_NOT_SEARCHABLE : INDEX_SEARCHABLE); hash.put(NORMS, "false"); hash.put(STORE, valueOf(store)); if (FIELD_TYPE_KEYWORD.equals(getFieldType())) { hash.put("doc_values", valueOf(!disabledDocValues)); } if (getFieldData()) { hash.put(FIELD_FIELDDATA, FIELDDATA_ENABLED); } if (termVectorWithPositionOffsets) { hash.put(FIELD_TERM_VECTOR, "with_positions_offsets"); } hash.put("fields", configureSubFields()); return indexType.setProperty(fieldName, hash); }
private NewIndexType buildWithoutSubfields() { Map<String, Object> hash = new TreeMap<>(); hash.put("type", getFieldType()); hash.put(INDEX, disableSearch ? INDEX_NOT_SEARCHABLE : INDEX_SEARCHABLE); hash.put(NORMS, valueOf(!disableNorms)); hash.put(STORE, valueOf(store)); if (FIELD_TYPE_KEYWORD.equals(getFieldType())) { hash.put("doc_values", valueOf(!disabledDocValues)); } if (getFieldData()) { hash.put(FIELD_FIELDDATA, FIELDDATA_ENABLED); } return indexType.setProperty(fieldName, hash); }
private NewIndexType buildWithSubfields() { Map<String, Object> hash = new TreeMap<>(); hash.put("type", getFieldType()); hash.put(INDEX, disableSearch ? INDEX_NOT_SEARCHABLE : INDEX_SEARCHABLE); hash.put(NORMS, "false"); hash.put(STORE, valueOf(store)); if (FIELD_TYPE_KEYWORD.equals(getFieldType())) { hash.put("doc_values", valueOf(!disabledDocValues)); } if (getFieldData()) { hash.put(FIELD_FIELDDATA, FIELDDATA_ENABLED); } if (termVectorWithPositionOffsets) { hash.put(FIELD_TERM_VECTOR, "with_positions_offsets"); } hash.put("fields", configureSubFields()); return indexType.setProperty(fieldName, hash); }