You still need to have the term_vector mapping set on the title field to
"with_positions_offsets".
On Wed, Dec 29, 2010 at 7:16 AM, senthil prabhu senthilsebi@gmail.comwrote:
Hi,
I want to know how to highlight in Elasticsearch version
0.14.0. Here I am indexing a file with below mapping query.Mapping query:{"metadata" : {"dynamic" :"true","_source" :
{"enabled" :true },"properties" : { } } }and i am search here using the below query
Search query:{"query" : { "query_string" : { "default_field" : "",
"query" : "title:tiff0003","default_operator" : "OR","analyzer" :
"standard","allow_leading_wildcard" :
true,"lowercase_expanded_terms" : true,"enable_position_increments" :
true,"fuzzy_prefix_length" : 0,"fuzzy_min_sim" : 0.5,"phrase_slop" :
0,"boost" : 1.0 } }, "from" : 0, "size" : 20, "highlight" :
{ "tags_schema" : "styled" ,"pre_tags" : [ ""] ,"post_tags" :
[ "" ] ,"fields" : { "title" : {"fragment_size" :
1500,"number_of_fragments" : 10 } } }, "explain" : false,"fields" :
["title" ] }.search output gets one document without highlighting.Is any thing
wrong in my queries. can anyone explain how to get highlight using
_source field.