rename analyzed to tokenized to match field type
This commit is contained in:
parent
b9c5f0472c
commit
f3dbe9224a
|
@ -122,7 +122,7 @@ public interface FieldMapper<T> {
|
||||||
|
|
||||||
boolean indexed();
|
boolean indexed();
|
||||||
|
|
||||||
boolean analyzed();
|
boolean tokenized();
|
||||||
|
|
||||||
boolean stored();
|
boolean stored();
|
||||||
|
|
||||||
|
|
|
@ -319,7 +319,7 @@ public abstract class AbstractFieldMapper<T> implements FieldMapper<T>, Mapper {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean analyzed() {
|
public boolean tokenized() {
|
||||||
return fieldType.tokenized();
|
return fieldType.tokenized();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -524,13 +524,13 @@ public abstract class AbstractFieldMapper<T> implements FieldMapper<T>, Mapper {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
AbstractFieldMapper fieldMergeWith = (AbstractFieldMapper) mergeWith;
|
AbstractFieldMapper fieldMergeWith = (AbstractFieldMapper) mergeWith;
|
||||||
if (this.indexed() != fieldMergeWith.indexed() || this.analyzed() != fieldMergeWith.analyzed()) {
|
if (this.indexed() != fieldMergeWith.indexed() || this.tokenized() != fieldMergeWith.tokenized()) {
|
||||||
mergeContext.addConflict("mapper [" + names.fullName() + "] has different index values");
|
mergeContext.addConflict("mapper [" + names.fullName() + "] has different index values");
|
||||||
}
|
}
|
||||||
if (this.stored() != fieldMergeWith.stored()) {
|
if (this.stored() != fieldMergeWith.stored()) {
|
||||||
mergeContext.addConflict("mapper [" + names.fullName() + "] has different store values");
|
mergeContext.addConflict("mapper [" + names.fullName() + "] has different store values");
|
||||||
}
|
}
|
||||||
if (this.analyzed() != fieldMergeWith.analyzed()) {
|
if (this.tokenized() != fieldMergeWith.tokenized()) {
|
||||||
mergeContext.addConflict("mapper [" + names.fullName() + "] has different tokenize values");
|
mergeContext.addConflict("mapper [" + names.fullName() + "] has different tokenize values");
|
||||||
}
|
}
|
||||||
if (this.storeTermVectors() != fieldMergeWith.storeTermVectors()) {
|
if (this.storeTermVectors() != fieldMergeWith.storeTermVectors()) {
|
||||||
|
|
|
@ -225,8 +225,8 @@ public class BooleanFieldMapper extends AbstractFieldMapper<Boolean> {
|
||||||
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
||||||
super.doXContentBody(builder);
|
super.doXContentBody(builder);
|
||||||
if (indexed() != Defaults.BOOLEAN_FIELD_TYPE.indexed() ||
|
if (indexed() != Defaults.BOOLEAN_FIELD_TYPE.indexed() ||
|
||||||
analyzed() != Defaults.BOOLEAN_FIELD_TYPE.tokenized()) {
|
tokenized() != Defaults.BOOLEAN_FIELD_TYPE.tokenized()) {
|
||||||
builder.field("index", indexTokenizeOptionToString(indexed(), analyzed()));
|
builder.field("index", indexTokenizeOptionToString(indexed(), tokenized()));
|
||||||
}
|
}
|
||||||
if (stored() != Defaults.BOOLEAN_FIELD_TYPE.stored()) {
|
if (stored() != Defaults.BOOLEAN_FIELD_TYPE.stored()) {
|
||||||
builder.field("store", stored());
|
builder.field("store", stored());
|
||||||
|
|
|
@ -329,8 +329,8 @@ public class ByteFieldMapper extends NumberFieldMapper<Byte> {
|
||||||
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
||||||
super.doXContentBody(builder);
|
super.doXContentBody(builder);
|
||||||
if (indexed() != Defaults.BYTE_FIELD_TYPE.indexed() ||
|
if (indexed() != Defaults.BYTE_FIELD_TYPE.indexed() ||
|
||||||
analyzed() != Defaults.BYTE_FIELD_TYPE.tokenized()) {
|
tokenized() != Defaults.BYTE_FIELD_TYPE.tokenized()) {
|
||||||
builder.field("index", indexTokenizeOptionToString(indexed(), analyzed()));
|
builder.field("index", indexTokenizeOptionToString(indexed(), tokenized()));
|
||||||
}
|
}
|
||||||
if (stored() != Defaults.BYTE_FIELD_TYPE.stored()) {
|
if (stored() != Defaults.BYTE_FIELD_TYPE.stored()) {
|
||||||
builder.field("store", stored());
|
builder.field("store", stored());
|
||||||
|
|
|
@ -403,8 +403,8 @@ public class DateFieldMapper extends NumberFieldMapper<Long> {
|
||||||
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
||||||
super.doXContentBody(builder);
|
super.doXContentBody(builder);
|
||||||
if (indexed() != Defaults.DATE_FIELD_TYPE.indexed() ||
|
if (indexed() != Defaults.DATE_FIELD_TYPE.indexed() ||
|
||||||
analyzed() != Defaults.DATE_FIELD_TYPE.tokenized()) {
|
tokenized() != Defaults.DATE_FIELD_TYPE.tokenized()) {
|
||||||
builder.field("index", indexTokenizeOptionToString(indexed(), analyzed()));
|
builder.field("index", indexTokenizeOptionToString(indexed(), tokenized()));
|
||||||
}
|
}
|
||||||
if (stored() != Defaults.DATE_FIELD_TYPE.stored()) {
|
if (stored() != Defaults.DATE_FIELD_TYPE.stored()) {
|
||||||
builder.field("store", stored());
|
builder.field("store", stored());
|
||||||
|
|
|
@ -332,8 +332,8 @@ public class DoubleFieldMapper extends NumberFieldMapper<Double> {
|
||||||
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
||||||
super.doXContentBody(builder);
|
super.doXContentBody(builder);
|
||||||
if (indexed() != Defaults.DOUBLE_FIELD_TYPE.indexed() ||
|
if (indexed() != Defaults.DOUBLE_FIELD_TYPE.indexed() ||
|
||||||
analyzed() != Defaults.DOUBLE_FIELD_TYPE.tokenized()) {
|
tokenized() != Defaults.DOUBLE_FIELD_TYPE.tokenized()) {
|
||||||
builder.field("index", indexTokenizeOptionToString(indexed(), analyzed()));
|
builder.field("index", indexTokenizeOptionToString(indexed(), tokenized()));
|
||||||
}
|
}
|
||||||
if (stored() != Defaults.DOUBLE_FIELD_TYPE.stored()) {
|
if (stored() != Defaults.DOUBLE_FIELD_TYPE.stored()) {
|
||||||
builder.field("store", stored());
|
builder.field("store", stored());
|
||||||
|
|
|
@ -327,8 +327,8 @@ public class FloatFieldMapper extends NumberFieldMapper<Float> {
|
||||||
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
||||||
super.doXContentBody(builder);
|
super.doXContentBody(builder);
|
||||||
if (indexed() != Defaults.FLOAT_FIELD_TYPE.indexed() ||
|
if (indexed() != Defaults.FLOAT_FIELD_TYPE.indexed() ||
|
||||||
analyzed() != Defaults.FLOAT_FIELD_TYPE.tokenized()) {
|
tokenized() != Defaults.FLOAT_FIELD_TYPE.tokenized()) {
|
||||||
builder.field("index", indexTokenizeOptionToString(indexed(), analyzed()));
|
builder.field("index", indexTokenizeOptionToString(indexed(), tokenized()));
|
||||||
}
|
}
|
||||||
if (stored() != Defaults.FLOAT_FIELD_TYPE.stored()) {
|
if (stored() != Defaults.FLOAT_FIELD_TYPE.stored()) {
|
||||||
builder.field("store", stored());
|
builder.field("store", stored());
|
||||||
|
|
|
@ -332,8 +332,8 @@ public class IntegerFieldMapper extends NumberFieldMapper<Integer> {
|
||||||
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
||||||
super.doXContentBody(builder);
|
super.doXContentBody(builder);
|
||||||
if (indexed() != Defaults.INTEGER_FIELD_TYPE.indexed() ||
|
if (indexed() != Defaults.INTEGER_FIELD_TYPE.indexed() ||
|
||||||
analyzed() != Defaults.INTEGER_FIELD_TYPE.tokenized()) {
|
tokenized() != Defaults.INTEGER_FIELD_TYPE.tokenized()) {
|
||||||
builder.field("index", indexTokenizeOptionToString(indexed(), analyzed()));
|
builder.field("index", indexTokenizeOptionToString(indexed(), tokenized()));
|
||||||
}
|
}
|
||||||
if (stored() != Defaults.INTEGER_FIELD_TYPE.stored()) {
|
if (stored() != Defaults.INTEGER_FIELD_TYPE.stored()) {
|
||||||
builder.field("store", stored());
|
builder.field("store", stored());
|
||||||
|
|
|
@ -331,8 +331,8 @@ public class LongFieldMapper extends NumberFieldMapper<Long> {
|
||||||
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
||||||
super.doXContentBody(builder);
|
super.doXContentBody(builder);
|
||||||
if (indexed() != Defaults.LONG_FIELD_TYPE.indexed() ||
|
if (indexed() != Defaults.LONG_FIELD_TYPE.indexed() ||
|
||||||
analyzed() != Defaults.LONG_FIELD_TYPE.tokenized()) {
|
tokenized() != Defaults.LONG_FIELD_TYPE.tokenized()) {
|
||||||
builder.field("index", indexTokenizeOptionToString(indexed(), analyzed()));
|
builder.field("index", indexTokenizeOptionToString(indexed(), tokenized()));
|
||||||
}
|
}
|
||||||
if (stored() != Defaults.LONG_FIELD_TYPE.stored()) {
|
if (stored() != Defaults.LONG_FIELD_TYPE.stored()) {
|
||||||
builder.field("store", stored());
|
builder.field("store", stored());
|
||||||
|
|
|
@ -331,8 +331,8 @@ public class ShortFieldMapper extends NumberFieldMapper<Short> {
|
||||||
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
||||||
super.doXContentBody(builder);
|
super.doXContentBody(builder);
|
||||||
if (indexed() != Defaults.SHORT_FIELD_TYPE.indexed() ||
|
if (indexed() != Defaults.SHORT_FIELD_TYPE.indexed() ||
|
||||||
analyzed() != Defaults.SHORT_FIELD_TYPE.tokenized()) {
|
tokenized() != Defaults.SHORT_FIELD_TYPE.tokenized()) {
|
||||||
builder.field("index", indexTokenizeOptionToString(indexed(), analyzed()));
|
builder.field("index", indexTokenizeOptionToString(indexed(), tokenized()));
|
||||||
}
|
}
|
||||||
if (stored() != Defaults.SHORT_FIELD_TYPE.stored()) {
|
if (stored() != Defaults.SHORT_FIELD_TYPE.stored()) {
|
||||||
builder.field("store", stored());
|
builder.field("store", stored());
|
||||||
|
|
|
@ -319,8 +319,8 @@ public class StringFieldMapper extends AbstractFieldMapper<String> implements Al
|
||||||
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
||||||
super.doXContentBody(builder);
|
super.doXContentBody(builder);
|
||||||
if (indexed() != Defaults.STRING_FIELD_TYPE.indexed() ||
|
if (indexed() != Defaults.STRING_FIELD_TYPE.indexed() ||
|
||||||
analyzed() != Defaults.STRING_FIELD_TYPE.tokenized()) {
|
tokenized() != Defaults.STRING_FIELD_TYPE.tokenized()) {
|
||||||
builder.field("index", indexTokenizeOptionToString(indexed(), analyzed()));
|
builder.field("index", indexTokenizeOptionToString(indexed(), tokenized()));
|
||||||
}
|
}
|
||||||
if (stored() != Defaults.STRING_FIELD_TYPE.stored()) {
|
if (stored() != Defaults.STRING_FIELD_TYPE.stored()) {
|
||||||
builder.field("store", stored());
|
builder.field("store", stored());
|
||||||
|
|
|
@ -306,8 +306,8 @@ public class IpFieldMapper extends NumberFieldMapper<Long> {
|
||||||
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
protected void doXContentBody(XContentBuilder builder) throws IOException {
|
||||||
super.doXContentBody(builder);
|
super.doXContentBody(builder);
|
||||||
if (indexed() != Defaults.IP_FIELD_TYPE.indexed() ||
|
if (indexed() != Defaults.IP_FIELD_TYPE.indexed() ||
|
||||||
analyzed() != Defaults.IP_FIELD_TYPE.tokenized()) {
|
tokenized() != Defaults.IP_FIELD_TYPE.tokenized()) {
|
||||||
builder.field("index", indexTokenizeOptionToString(indexed(), analyzed()));
|
builder.field("index", indexTokenizeOptionToString(indexed(), tokenized()));
|
||||||
}
|
}
|
||||||
if (stored() != Defaults.IP_FIELD_TYPE.stored()) {
|
if (stored() != Defaults.IP_FIELD_TYPE.stored()) {
|
||||||
builder.field("store", stored());
|
builder.field("store", stored());
|
||||||
|
|
Loading…
Reference in New Issue