mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-26 14:54:56 +00:00
Explicitly specify analyzer scope
Related to elastic/elasticsearchelastic/elasticsearch#20197 Original commit: elastic/x-pack-elasticsearch@af9258a8a6
This commit is contained in:
parent
6c587330fd
commit
bb8c08f254
@ -46,6 +46,7 @@ import org.elasticsearch.common.xcontent.ToXContent;
|
|||||||
import org.elasticsearch.common.xcontent.XContentBuilder;
|
import org.elasticsearch.common.xcontent.XContentBuilder;
|
||||||
import org.elasticsearch.index.Index;
|
import org.elasticsearch.index.Index;
|
||||||
import org.elasticsearch.index.IndexSettings;
|
import org.elasticsearch.index.IndexSettings;
|
||||||
|
import org.elasticsearch.index.analysis.AnalyzerScope;
|
||||||
import org.elasticsearch.index.analysis.IndexAnalyzers;
|
import org.elasticsearch.index.analysis.IndexAnalyzers;
|
||||||
import org.elasticsearch.index.analysis.NamedAnalyzer;
|
import org.elasticsearch.index.analysis.NamedAnalyzer;
|
||||||
import org.elasticsearch.index.cache.bitset.BitsetFilterCache;
|
import org.elasticsearch.index.cache.bitset.BitsetFilterCache;
|
||||||
@ -124,7 +125,7 @@ public class SecurityIndexSearcherWrapperUnitTests extends ESTestCase {
|
|||||||
Index index = new Index("_index", "testUUID");
|
Index index = new Index("_index", "testUUID");
|
||||||
scriptService = mock(ScriptService.class);
|
scriptService = mock(ScriptService.class);
|
||||||
indexSettings = IndexSettingsModule.newIndexSettings(index, Settings.EMPTY);
|
indexSettings = IndexSettingsModule.newIndexSettings(index, Settings.EMPTY);
|
||||||
NamedAnalyzer namedAnalyzer = new NamedAnalyzer("default", new StandardAnalyzer());
|
NamedAnalyzer namedAnalyzer = new NamedAnalyzer("default", AnalyzerScope.INDEX, new StandardAnalyzer());
|
||||||
IndexAnalyzers indexAnalyzers = new IndexAnalyzers(indexSettings, namedAnalyzer, namedAnalyzer, namedAnalyzer,
|
IndexAnalyzers indexAnalyzers = new IndexAnalyzers(indexSettings, namedAnalyzer, namedAnalyzer, namedAnalyzer,
|
||||||
Collections.emptyMap());
|
Collections.emptyMap());
|
||||||
SimilarityService similarityService = new SimilarityService(indexSettings, Collections.emptyMap());
|
SimilarityService similarityService = new SimilarityService(indexSettings, Collections.emptyMap());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user