alexklibisz / elastiknn

Elasticsearch plugin for nearest neighbor search. Store vectors and run similarity search using exact and approximate algorithms.
https://alexklibisz.github.io/elastiknn
Apache License 2.0
362 stars 48 forks source link

cannot create runtime field during seach #695

Closed jackyin5918 closed 1 month ago

jackyin5918 commented 1 month ago

Support guidelines

Background

My index has a nested field, and this nested field has a field of type elastiknn_dense_float_vector.

attrs is a nested field, and attrs has a attr_value_vec field of elastiknn_dense_float_vector type.

I try to create a runtime_mappings during search.

"runtime_mappings": { "attr_7935": { "type": "elastiknn_dense_float_vector", "elastiknn": { "dims": 768, "model": "lsh", "similarity": "cosine", "L": 99, "k": 1 }, "script": { "source": """ return doc['attrs.attr_value_vec'].value[0] """ } } },

and I get below error,

BadRequestError(400, 'search_phase_execution_exception', 'No handler for type [elastiknn_dense_float_vector] declared on runtime field [attr_7935]')

Bug

and I get below error,

BadRequestError(400, 'search_phase_execution_exception', 'No handler for type [elastiknn_dense_float_vector] declared on runtime field [attr_7935]')

Elastiknn Version

7.17.0.1

Platform

Kubernetes

Steps to reproduce

No response

Additional info

No response

jackyin5918 commented 1 month ago

seems like

The runtime section can be any of these data types: