Could be related to #3354998 🐛 #states disable property has stopped working for some element types Needs work ?
Rerolled #8 for Drupal 9.5.8.
tallytarik → created an issue.
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.
tallytarik → created an issue.
#24 also worked for me, Drupal 8.6.5.