Description
Elasticsearch version (bin/elasticsearch --version
): 7.15.2
Plugins installed: []
JVM version (java -version
): the one included in ES
OS version (uname -a
if on a Unix-like system): Windows 10
Description of the problem including expected versus actual behavior:
When using a nested field as target for Fast Vector Highligter no result is produced. (This works fine with the Unified Highlighter).
The problem seems to be that fvh tries to read the target field literally from the source and as this would not be present in the source
it assumes that the field is absent. If the nested field has store: true
set everything works as expected as it then reads the stored field instead of visiting the source-object.
The reason for using a nested field as target is that the root-field is a date-field and we then have multiple nested fields with different versions of the date-string with with_positions_offsets
enabled for term_vector
.
Steps to reproduce:
make a search like the following with and without store:true
enabled in the mapping of the the nested target field (date.text
).
{
"query": {
"query_string": {
"query": "2000-10-10",
"fields": [ "date.text" ],
"quote_field_suffix": ".exact"
}
},
"highlight": {
"fields": {
"date.text": {
"matched_fields": [ "date.text", "date.text.exact" ],
"type": "fvh"
}
}
}
}