Account created on 15 August 2018, over 6 years ago
#

Recent comments

🇦🇺Australia tallytarik

I've just run into this trying to use the Neural Search plugin with a custom knn_vector field and ingest pipeline. That field type only supports a single value, and throws an error when it's passed an array. This is what happens at the moment because the input text field (title in my case) is indexed as an array:

[error] failed to parse field [title_embedding] of type [knn_vector] in document with id 'entity:node/12345:en'. Preview of field's value: '{knn=[...]}'. Current token (START_OBJECT) not numeric, can not use numeric value accessors

I've hacked together a change to IndexParamBuilder::buildFieldValues() to return the value as a string instead of an array, and can confirm it now works. Something like the patch 💬 Source Fields in Elasticsearch Index are arrays RTBC in the linked issue might be the way to go - check the field cardinality for each field, and if it's 1, process and return the first (and only) value rather than as an array. I'm pretty new to OpenSearch so not 100% across if there could be other impacts of that change, though.

Production build 0.71.5 2024