Elastic Index config - better TEXT search (instead of keyword) #8584
+180
−30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Working on the GN5 (and gn-microservices) OGCAPI-Records "queryables" search, I've found that many of the elastic indexed properties are
type:keyword
. This changes, the most likely to be searched ones, totype:text
.type:keyword
- these are more forenum
-like fields where the possible values are known by the person searching. It only does "exact match"type:text
- These are free-text fields where you can search for text INSIDE the value.For example, an email address marked as
keyword
would only match the exact email address ([email protected]
). If you searched fordavid
, it would not return the document.If that email address is a marked as
text
, then it will be found by searching fordavid
,blasby
,david.blasby
,geocat
(etc...).This makes the index more friendly to people searching in it. I expect there is a cost to doing this (i.e. index size), but I don't think this will make much of a difference in most people's installations (unless then have millions and millions of records).
The other possible issue will be returning too many documents when searching - especially inside keyword-like fields. I don't think this will be a big issue (mentioning so reviewers would be aware).
Checklist
main
branch, backports managed with labelREADME.md
filespom.xml
dependency management. Update build documentation with intended library use and library tutorials or documentation