-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(search): adjust search config (#10774)
- Loading branch information
1 parent
724907b
commit bffcafb
Showing
9 changed files
with
290 additions
and
120 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
97 changes: 97 additions & 0 deletions
97
metadata-service/configuration/src/main/resources/search_config.yaml
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,97 @@ | ||
# Notes: | ||
# | ||
# First match wins | ||
# | ||
# queryRegex = Java regex syntax | ||
# | ||
# functionScores - See the following for function score syntax | ||
# https://www.elastic.co/guide/en/elasticsearch/reference/7.17/query-dsl-function-score-query.html | ||
|
||
queryConfigurations: | ||
# Select */explore all | ||
# Attempt to rank active incidents at the top followed by enrichment factors | ||
- queryRegex: '[*]|' | ||
simpleQuery: false | ||
prefixMatchQuery: false | ||
exactMatchQuery: false | ||
functionScore: | ||
functions: | ||
- filter: | ||
term: | ||
hasActiveIncidents: | ||
value: true | ||
weight: 2.0 | ||
- filter: | ||
term: | ||
hasDescription: | ||
value: true | ||
weight: 1.25 | ||
- filter: | ||
term: | ||
hasOwners: | ||
value: true | ||
weight: 1.25 | ||
- filter: | ||
term: | ||
hasDomain: | ||
value: true | ||
weight: 1.1 | ||
- filter: | ||
term: | ||
hasGlossaryTerms: | ||
value: true | ||
weight: 1.1 | ||
- filter: | ||
term: | ||
hasTags: | ||
value: true | ||
weight: 1.1 | ||
- filter: | ||
term: | ||
hasRowCount: | ||
value: true | ||
weight: 1.05 | ||
- filter: | ||
term: | ||
hasColumnCount: | ||
value: true | ||
weight: 1.05 | ||
- filter: | ||
term: | ||
deprecated: | ||
value: true | ||
weight: 0.25 | ||
score_mode: multiply | ||
boost_mode: replace | ||
|
||
# Criteria for exact-match only | ||
# Contains quotes, is a single term with `_`, `.`, or `-` (normally consider for tokenization) then use exact match query | ||
- queryRegex: >- | ||
^["'].+["']$|^[a-zA-Z0-9]\S+[_.-]\S+[a-zA-Z0-9]$ | ||
simpleQuery: false | ||
prefixMatchQuery: false | ||
exactMatchQuery: true | ||
functionScore: | ||
functions: | ||
- filter: | ||
term: | ||
deprecated: | ||
value: true | ||
weight: 0.25 | ||
score_mode: multiply | ||
boost_mode: multiply | ||
# default | ||
- queryRegex: .* | ||
simpleQuery: true | ||
prefixMatchQuery: true | ||
exactMatchQuery: true | ||
functionScore: | ||
functions: | ||
- filter: | ||
term: | ||
deprecated: | ||
value: true | ||
weight: 0.25 | ||
score_mode: multiply | ||
boost_mode: multiply |
71 changes: 0 additions & 71 deletions
71
metadata-service/factories/src/main/resources/search_config.yml
This file was deleted.
Oops, something went wrong.
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.