Problem with highlight after upgrade from 0.20.4 to 0.90.9

Hi,

I have updated ElasticSearch from 0.20.4 to 0.90.9 and have problem to get
the highlight to work.

The following search body (JSON-stringified) worked in the old version:
query: {
custom_filters_score: {
query: {
query_string: {
query: 'test',
fields: ['task.name^3', 'task.description']
}
}
},
size: 11,
highlight: {
encoder: 'html',
fields: {
_all: { number_of_fragments: 5 },
'task.name': {
fragment_size: 200
},
'task.description': {
fragment_size: 100
},
require_field_match: true
}
}
}

In the new version it returns:
{
"took": 5,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 2,
"max_score": 1.5957302,
"hits": [
{
"_index": "board",
"_type": "task",
"_id": "9160af7f92b9f5c769351d62650028e0",
"_score": 1.5957302,
"_source": {
"name": "Test1",
"description": ""
}
},
{
"_index": "board",
"_type": "task",
"_id": "9160af7f92b9f5c769351d6265003ae4",
"_score": 1.5957302,
"_source": {
"name": "Test2",
"description": ""

            }
        }
    ]
}

}

In 0.20.4 each item in the "hits" array contained a "highlight" property,
but now it doesn't. Why is that not included anymore?

Any help is appreciated.

/Calle

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/600a60a9-58c0-4f0a-bfc6-29538ae72e14%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

So after trying around, I have found out that if just have "name" and
"description" and not "task.name" and "task.description" in the "highlight"
section, the highlighting works. So is "." not supported for
highlights in 0.90.x? Or could I do it with some other syntax?

If not, how do you solve the case where you want to query many types with a
"name" field, but have different settings per type?

/Calle

Den torsdagen den 9:e januari 2014 kl. 11:31:31 UTC+1 skrev Calle Arnesten:

Hi,

I have updated Elasticsearch from 0.20.4 to 0.90.9 and have problem to get
the highlight to work.

The following search body (JSON-stringified) worked in the old version:
query: {
custom_filters_score: {
query: {
query_string: {
query: 'test',
fields: ['task.name^3', 'task.description']
}
}
},
size: 11,
highlight: {
encoder: 'html',
fields: {
_all: { number_of_fragments: 5 },
'task.name': {
fragment_size: 200
},
'task.description': {
fragment_size: 100
},
require_field_match: true
}
}
}

In the new version it returns:
{
"took": 5,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"failed": 0
},
"hits": {
"total": 2,
"max_score": 1.5957302,
"hits": [
{
"_index": "board",
"_type": "task",
"_id": "9160af7f92b9f5c769351d62650028e0",
"_score": 1.5957302,
"_source": {
"name": "Test1",
"description": ""
}
},
{
"_index": "board",
"_type": "task",
"_id": "9160af7f92b9f5c769351d6265003ae4",
"_score": 1.5957302,
"_source": {
"name": "Test2",
"description": ""

            }
        }
    ]
}

}

In 0.20.4 each item in the "hits" array contained a "highlight" property,
but now it doesn't. Why is that not included anymore?

Any help is appreciated.

/Calle

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/3ee83405-f2f6-4db0-bc13-3880d5cff450%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.