Add auto-generation of index mappings & settings based on processors #552
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.
Description
This PR adds default index mappings and index settings as ML processors are added / removed from ingest pipelines in real-time. The main idea is to add/remove any
knn_vector
field mappings, and updateindex.knn
totrue
/false
as users add or remove ML-related ingest processors, that contain any known embedding models. These 2 settings are critical and required for proper knn search to happen. Currently, the backend does not show any errors if these aren't configured correctly, and leads to user confusion when later seeing that there are no embeddings added. By adding this, this helps minimize users missing these configurations if knn search is desired.Testing:
Demo video, showing all of the different output map transform types, and how adding/removing processors updates the fields in real-time.
screen-capture.14.webm
Issues Resolved
Resolves #547
Check List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.