Skip to content

Commit 8874093

Browse files
committed
Fix test failure
Signed-off-by: Gao Binlong <gbinlong@amazon.com>
1 parent 763099a commit 8874093

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/search/190_index_prefix_search.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ setup:
137137
---
138138
"search index prefixes with multiple value":
139139
- skip:
140-
version: " - 2.11.99"
141-
reason: "the position_increment_gap was fixed in 2.12"
140+
version: " - 2.99.99"
141+
reason: "the position_increment_gap was fixed in 3.0.0"
142142
- do:
143143
search:
144144
rest_total_hits_as_int: true
@@ -153,8 +153,8 @@ setup:
153153
---
154154
"search index prefixes with multiple value and custom position_increment_gap":
155155
- skip:
156-
version: " - 2.11.99"
157-
reason: "the position_increment_gap was fixed in 2.12"
156+
version: " - 2.99.99"
157+
reason: "the position_increment_gap was fixed in 3.0.0"
158158
- do:
159159
search:
160160
rest_total_hits_as_int: true

server/src/test/java/org/opensearch/index/mapper/TextFieldTypeTests.java

+1
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ public void testFuzzyQuery() {
167167

168168
public void testIndexPrefixes() {
169169
TextFieldType ft = createFieldType(true);
170+
ft.setIndexAnalyzer(Lucene.STANDARD_ANALYZER);
170171
ft.setPrefixFieldType(new TextFieldMapper.PrefixFieldType(ft, "field._index_prefix", 2, 10));
171172

172173
Query q = ft.prefixQuery("goin", CONSTANT_SCORE_REWRITE, false, randomMockShardContext());

0 commit comments

Comments
 (0)