I having trouble dealing with multivalue query items and fields in terms of element similarity. For example, if we have an array of strings like such:
field colors type array<string>
# That might have several items like: "blue", "black and purple", "green", "yellow", etc
And I wish to query with a list of items:
"blue" (weight 0.5), "black" (weight 1.0)
Is there a way to perform a weighted listwise similarity that might look like: weight * elementSimilarity(blue on colors) + weight * elementSimilarity(black on colors)?
I've tried multiple features, including nativeRank, but I get inconsistent results depending on the length of the query array as well as the field array. As I also want to be able to deal with misspellings, "blu" should have a very high match with "blue" - hence why I prefer elementSimilarity. I think I've tried most of the rank features in vespa, but I haven't found a better way to deal with this use case.
Any guidance would be much appreciated! Thanks!
Edit: Just to elaborate, perhaps the biggest restriction to me in Vespa is how arrays are handled in the query. I would very much like to do something like:
expression {
foreach(terms,N,query(colors,N).weight*elementSimilarity(query(colors,N)),true,sum)
}