opensearch-project / k-NN

🆕 Find the k-nearest neighbors (k-NN) for your vector data
https://opensearch.org/docs/latest/search-plugins/knn/index/
Apache License 2.0
156 stars 123 forks source link

Allow method parameter override for training based indices #2246

Open jmazanec15 opened 2 weeks ago

jmazanec15 commented 2 weeks ago

Description

From mode/disk-based feature, we introduced concept of mode and compression level that will dynamically set default resolution. For indices created directly from the method (i.e. mapping) we allow users to override parameters if they want.

However, for training, we added the mode and compression, but made them mutually exclusive with method. See: https://github.com/opensearch-project/k-NN/blob/main/src/main/java/org/opensearch/knn/plugin/rest/RestTrainModelHandler.java#L138-L139. We need to remove this and allow method overriding to provide a consistent ux experience across the plugin.