I have an array field with the entries [foo, foobar, bar] and search for foo. The highlighting then returns for that field
[<em>foo</em>, <em>foo</em>bar]
I would like it to return
[<em>foo</em>, <em>foo</em>bar, bar]
I did try to set no_match_size as described on http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-highlighting.html but that didn't work. Is there any way to make elasticsearch behave the way I want?
I don't believe it has an option to do that right now. I don't think it'd be too hard to build though.
What would be better: To respect the setting of no_match_size for every single array entry or introduce a new setting parameter?
Hi, did this ever get fixed? I'm relying on this functionality returning non-matched entries for my application.
Hi Team,
Is there any plan to fix this in ES 5.0
+1 here
+1
+1
Would also like this. Or some other way to find out what fields in the original document actually got highlighted when having nested documents with arrays.
+1
any fixes available for this ??? My work would hugely depend on this.
If any fixes or script available, please let me know.
+1
Waiting for any fixes...
+1
+1
cc @elastic/es-search-aggs
+1
+1
+1
I have an ordered list of paragraphs in my documents, so It is very handy to store it like an array and display it directly from the highlight section.
Currently, I need to merge _source lines and highlight lines in code. It looks terrible: I'm removing highlighting tags and match _source with highlight.
I also faced with the need to get non-matching entries because arrays are the simplest way to implement relations. I know sub items order so I don't need to use nested objects. For example, I can just store usernames like an arrays:
[ "1", "2", "3" ]
[ "Alice", "John Doe", "Bob" ]
instead of using objects with ID:
[{id:"1", name: "Alice"}, {id:"2", name: "John Doe"}, {id: "3", name:"Bob"} ]
We index multi-valued fields as if it was a single value, each entry is appended and separated with a custom separator. This means that the offsets that we index are relative to the concatenated text.
This is needed because we don't know which value matched the query but only the offsets in the original text. In this context no_match_size refers to the situation where none of the value matches the query so we use the first value to populate the response. Though I think we should be able to return all values if the number of fragments is set to 0 (which means highlight the whole text). Currently only values that match the query are returned but if a single value matches then we should return all values. For the reason stated above this is not a low hanging fruit but it should be doable.
I don't have time to work on this at the moment so I'll mark this issue with the adoptme tag and will come back to it if nobody is interested.
Any update on the newest version?
Any update on the newest version?
This would be really useful. Would make things a lot easier for a project Im working on. Any update as to whether we are likely to see it implemented any time soon?
Waiting for any fixes
+1