-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore use of default search and search_quote analyzers (#65491)
In the refactoring of TextFieldMapper, we lost the ability to define a default search or search_quote analyzer in index settings. This commit restores that ability, and adds some more comprehensive testing. Fixes #65434
- Loading branch information
1 parent
04f453c
commit 1a8ce87
Showing
20 changed files
with
285 additions
and
91 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
...tTest/resources/rest-api-spec/test/search.query/41_query_string_with_default_analyzer.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,39 @@ | ||
--- | ||
"Test default search analyzer is applied": | ||
- do: | ||
indices.create: | ||
index: test | ||
body: | ||
settings: | ||
index.analysis.analyzer.default.type: simple | ||
index.analysis.analyzer.default_search.type: german | ||
mappings: | ||
properties: | ||
body: | ||
type: text | ||
|
||
- do: | ||
index: | ||
index: test | ||
id: 1 | ||
body: | ||
body: Ich lese die Bücher | ||
|
||
- do: | ||
indices.refresh: | ||
index: [ test ] | ||
|
||
- do: | ||
search: | ||
index: test | ||
q: "body:Bücher" | ||
|
||
- match: { hits.total.value: 0 } | ||
|
||
- do: | ||
search: | ||
index: test | ||
q: "body:Bücher" | ||
analyzer: simple | ||
|
||
- 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
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
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.