Skip to content

Commit

Permalink
changes for elasticearch 7.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Swen Thümmler committed Jan 6, 2021
1 parent 66e6de7 commit bdac066
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
group = org.xbib.elasticsearch
name = elasticsearch-plugin-bundle
version = 7.10.0.0
version = 7.10.1.0

elasticsearch.version = 7.10.0
elasticsearch.version = 7.10.1
lucene.version = 8.7.0

icu4j.version = 67.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.FieldType;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.BoostQuery;
Expand All @@ -17,6 +18,9 @@
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.xcontent.support.XContentMapValues;
import org.elasticsearch.index.analysis.AnalyzerScope;
import org.elasticsearch.index.analysis.IndexAnalyzers;
import org.elasticsearch.index.analysis.NamedAnalyzer;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.MappedFieldType;
import org.elasticsearch.index.mapper.Mapper;
Expand Down Expand Up @@ -319,11 +323,20 @@ public static class Builder extends FieldMapper.Builder<Builder> {

private List<String> refFields;

private static final IndexAnalyzers INDEX_ANALYZERS = new IndexAnalyzers(
Collections.singletonMap(
"default",
new NamedAnalyzer("default", AnalyzerScope.INDEX, new StandardAnalyzer())
),
Collections.emptyMap(),
Collections.emptyMap()
);

public Builder(String name, Client client) {
super(name, FIELD_TYPE);
this.client = client;
this.refFields = new LinkedList<>();
this.contentBuilder = new TextFieldMapper.Builder(name, () -> Lucene.STANDARD_ANALYZER);
this.contentBuilder = new TextFieldMapper.Builder(name, INDEX_ANALYZERS);
}

public Builder refIndex(String refIndex) {
Expand Down

0 comments on commit bdac066

Please sign in to comment.