Answer the question
In order to leave comments, you need to log in
How to find out which array element is matched in Elastic Search?
Among documents successfully I do search in an array "names".
Question: how to understand which of the elements is matched inside the score-function? Index or string value.
Document:
{
"names": [
{ "name_norm": "redone" },
{ "name_norm": "purpleone" }
]
}
{
"query": {
"function_score": {
"query": {
"regexp": {
"names.name_norm": {"value": "purpleone"}
}
},
"script_score": {
"script": {
"source": "100.0"
}}}}}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question