mirror of
https://github.com/spring-projects/spring-data-elasticsearch.git
synced 2025-06-08 13:12:10 +00:00
DATAES-211 - index analyzer is removed. use analyzer for search and index analyzer or use search analyzer.
This commit is contained in:
parent
61880671a4
commit
a05a597123
@ -30,7 +30,7 @@ public @interface CompletionField {
|
|||||||
|
|
||||||
String searchAnalyzer() default "simple";
|
String searchAnalyzer() default "simple";
|
||||||
|
|
||||||
String indexAnalyzer() default "simple";
|
String analyzer() default "simple";
|
||||||
|
|
||||||
boolean payloads() default false;
|
boolean payloads() default false;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public @interface Field {
|
|||||||
|
|
||||||
String searchAnalyzer() default "";
|
String searchAnalyzer() default "";
|
||||||
|
|
||||||
String indexAnalyzer() default "";
|
String analyzer() default "";
|
||||||
|
|
||||||
String[] ignoreFields() default {};
|
String[] ignoreFields() default {};
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class MappingBuilder {
|
|||||||
public static final String FIELD_INDEX = "index";
|
public static final String FIELD_INDEX = "index";
|
||||||
public static final String FIELD_FORMAT = "format";
|
public static final String FIELD_FORMAT = "format";
|
||||||
public static final String FIELD_SEARCH_ANALYZER = "search_analyzer";
|
public static final String FIELD_SEARCH_ANALYZER = "search_analyzer";
|
||||||
public static final String FIELD_INDEX_ANALYZER = "index_analyzer";
|
public static final String FIELD_INDEX_ANALYZER = "analyzer";
|
||||||
public static final String FIELD_PROPERTIES = "properties";
|
public static final String FIELD_PROPERTIES = "properties";
|
||||||
public static final String FIELD_PARENT = "_parent";
|
public static final String FIELD_PARENT = "_parent";
|
||||||
|
|
||||||
@ -217,8 +217,8 @@ class MappingBuilder {
|
|||||||
if (isNotBlank(annotation.searchAnalyzer())) {
|
if (isNotBlank(annotation.searchAnalyzer())) {
|
||||||
xContentBuilder.field(FIELD_SEARCH_ANALYZER, annotation.searchAnalyzer());
|
xContentBuilder.field(FIELD_SEARCH_ANALYZER, annotation.searchAnalyzer());
|
||||||
}
|
}
|
||||||
if (isNotBlank(annotation.indexAnalyzer())) {
|
if (isNotBlank(annotation.analyzer())) {
|
||||||
xContentBuilder.field(FIELD_INDEX_ANALYZER, annotation.indexAnalyzer());
|
xContentBuilder.field(FIELD_INDEX_ANALYZER, annotation.analyzer());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xContentBuilder.endObject();
|
xContentBuilder.endObject();
|
||||||
@ -256,8 +256,8 @@ class MappingBuilder {
|
|||||||
if (isNotBlank(fieldAnnotation.searchAnalyzer())) {
|
if (isNotBlank(fieldAnnotation.searchAnalyzer())) {
|
||||||
xContentBuilder.field(FIELD_SEARCH_ANALYZER, fieldAnnotation.searchAnalyzer());
|
xContentBuilder.field(FIELD_SEARCH_ANALYZER, fieldAnnotation.searchAnalyzer());
|
||||||
}
|
}
|
||||||
if (isNotBlank(fieldAnnotation.indexAnalyzer())) {
|
if (isNotBlank(fieldAnnotation.analyzer())) {
|
||||||
xContentBuilder.field(FIELD_INDEX_ANALYZER, fieldAnnotation.indexAnalyzer());
|
xContentBuilder.field(FIELD_INDEX_ANALYZER, fieldAnnotation.analyzer());
|
||||||
}
|
}
|
||||||
xContentBuilder.endObject();
|
xContentBuilder.endObject();
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ public class SampleMappingEntity {
|
|||||||
@Id
|
@Id
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Field(type = String, index = not_analyzed, store = true, searchAnalyzer = "standard", indexAnalyzer = "standard")
|
@Field(type = String, index = not_analyzed, store = true, analyzer = "standard")
|
||||||
private String message;
|
private String message;
|
||||||
|
|
||||||
private NestedEntity nested;
|
private NestedEntity nested;
|
||||||
|
@ -32,7 +32,7 @@ public class SampleTransientEntity {
|
|||||||
@Id
|
@Id
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
@Field(type = String, index = not_analyzed, store = true, searchAnalyzer = "standard", indexAnalyzer = "standard")
|
@Field(type = String, index = not_analyzed, store = true, analyzer = "standard")
|
||||||
private String message;
|
private String message;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
|
Loading…
x
Reference in New Issue
Block a user