2.0.0 Beta doesn't seem to return highlights


#1

I have 1.51, 1.6.0, 1.7.2 and 2.0.0 beta installed locally for testing. Nothing seems different in the online docs in regards to highlights and 2.0.0 beta, but 2.0.0 does not return highlights to me and I was wondering if anyone noticed this, or if the mechanism has changed?

For example, in all but 2.0.0, the following will return hit highlighting for all matched fields:
, "highlight": {
"fields": {
"*": {}
}

In the 2.0.0 beta, I get no highlight data and I'm not sure what to change to correct it. Does anyone have any more information, or a link you could direct me towards? Thanks much.


(Mark Walkom) #2

Are you able to provide a complete replication using Sense/curl?


#3

Here's the full search query. Search for a value not a *, and in the other releases, using * in my highlight request returns all fields per document that match. In the other versions, inclusion of the ?pretty was required for highlighting to return.

GET /_search?pretty
{
"from": 0,
"size": 5,
"query": {
"filtered": {
"query": {
"query_string": {
"query": "fred"
}
}
}
}
, "highlight": {
"fields": {
"*": {}
}
}
}


(Mark Walkom) #4

By complete recreation I meant this :slight_smile:


#5

That search could be run on ANY mapping in ANY environment in ANY 1.5.1 or later version of Elastic. You might need to change the search string to one that's in a local database, but I was asking a GENERAL QUESTION, not a specific detailed example. In neither 2.0.0 beta 1 or beta 2 does highlighting data return. That query runs in 1.5.1, 1.6.0, 1.7.2 but not in the 2.0.0 products.


#6

Added this and no change:
, "require_field_match" : "false"

According to the 2.0 docs, this should allow a search for _all to return highlights on details, whereas the default was changed, but it still does not.


(system) #7