Thanks for answer.
Here is curl recreation https://gist.github.com/1032233
Also issued result ( item4.description ) (you can see all doc also in _source )
Please tell, can I do the trick with highlight fields like ["item*.title", "item*.description"] in query fields?
I understand, it looks bit strange. I’m try to explain:
All my docs contains 10 items with title and description (and so on, not important). I need to have 1 match per field, so my first version with just array of items wont work. If i setup number_of_fragments to 1 it returns only 1 result for all 10 items. If i setup number_of_fragments to 0 it returns all description concatenated in 1 highlight. So solution is to make item1, item2 etc.
Is it best solution?
17 черв. 2011, в 19:27, Shay Banon написал(а):
Can you post a curl recreation? http://www.elasticsearch.org/help
On Friday, June 17, 2011 at 11:59 AM, Ярослав Концевой wrote:
I nave query with highight like this:
'highlight' => array(
//'fields' => array('_all' => new stdClass() )
'fields' => array(
//'_all' => new stdClass(),
'title' => new stdClass(),
'item.title' ==3D> array('number_of_fragments' => 1, "fragment_size" => 128),
'item.description' => array('number_of_fragments' => 1, "fragment_size" => 128),
if i supply query:
item.description returns only 128 chars, as expected. But if
it returns the same 128 chars and all remainder of that field. Bit strange.
Should I provide additional info?