-
Notifications
You must be signed in to change notification settings - Fork 25.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highlight Field Order #26612
Comments
@nik9000 could you take a look at this? |
Highlighting doesn't have an option to sort the fields returned in any way. The Sorry we don't have the thing you want! We certainly could make something like that but we aren't really doing a ton of work on highlighters and comparing the scores across different fields is a somewhat fraught thing. |
@nik9000 Thanks so much for the response! Do you think it's a good idea to make the documentation a bit more clear on what the sorting means and results in? Just to prevent further misunderstandings like this. |
Sure! Are you interested in fixing it or should I add this to my TODO list? |
@nik9000 I'd be glad to do it. A few more questions though, I don't see in the documentation anywhere if it states that |
I don't believe it is the default. At least it wasn't the default when I last used it which was a few years ago. I think the default is the order that the fragments appear in the document. |
@nik9000 From reading this https://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-request-highlighting.html it seems as though the property is |
I suspect I've just made a mistake when remembering the name of the setting. |
Ah ok, thanks. It happens :) |
Hi @nik9000 I also want this functionality for my project, is it built yet?, if it is please let me know, if not then I am more than happy to take this issue to my bucket. |
No one's worked on it. |
Elasticsearch version: 1.7
Plugins installed: Mapper Attachments
OS version: Sierra
Description of the problem including expected versus actual behaviour:
In https://www.elastic.co/guide/en/elasticsearch/reference/1.7/search-request-highlighting.html, it states that by setting
order:score
, my highlight results will be ordered in terms of relevancy (score). But how is that done considering the result is a highlight object that is a JSON object?I've also tried it, and my fields do not get sorted by relevancy. I have the following two fields:
When I perform the following search:
I get the following highlighting return. Note that last updated date is before testTextArea, even though there's more matches in testTextArea.
Steps to reproduce:
Provide logs (if relevant):
The text was updated successfully, but these errors were encountered: