-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into fix-issue-15989
Signed-off-by: Ashish Singh <[email protected]>
- Loading branch information
Showing
26 changed files
with
1,120 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
75 changes: 75 additions & 0 deletions
75
rest-api-spec/src/main/resources/rest-api-spec/test/search/390_search_as_you_type.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
setup: | ||
- do: | ||
indices.create: | ||
index: test_1 | ||
body: | ||
mappings: | ||
properties: | ||
text: | ||
type: search_as_you_type | ||
fields: | ||
subField: | ||
type: keyword | ||
- do: | ||
index: | ||
index: test_1 | ||
id: 1 | ||
body: { text: test search as you type } | ||
|
||
- do: | ||
indices.refresh: | ||
index: [test_1] | ||
|
||
--- | ||
teardown: | ||
- do: | ||
indices.delete: | ||
index: test_1 | ||
|
||
# related issue: https://github.com/opensearch-project/OpenSearch/issues/5035 | ||
--- | ||
"Test search_as_you_type data type supports multi-fields": | ||
- skip: | ||
version: " - 2.99.99" | ||
reason: "the bug was fixed since 3.0.0" | ||
|
||
- do: | ||
indices.get_mapping: { | ||
index: test_1 | ||
} | ||
|
||
- match: {test_1.mappings.properties.text.type: search_as_you_type} | ||
- match: {test_1.mappings.properties.text.fields.subField.type: keyword} | ||
|
||
- do: | ||
search: | ||
index: test_1 | ||
body: | ||
query: | ||
multi_match: | ||
query: "test search" | ||
type: "bool_prefix" | ||
|
||
- match: {hits.total.value: 1} | ||
|
||
- do: | ||
search: | ||
index: test_1 | ||
body: | ||
query: | ||
multi_match: | ||
query: "test search" | ||
type: "bool_prefix" | ||
fields: ["text.subField"] | ||
|
||
- match: {hits.total.value: 1} | ||
|
||
- do: | ||
search: | ||
index: test_1 | ||
body: | ||
query: | ||
term: | ||
text.subField: "test search as you type" | ||
|
||
- match: {hits.total.value: 1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.