Hi all,
Highlight not working for the below query (query_string)
{ "query_string" : {"query" : "_text:"Rasheed Wallace tied a season
high with 25 points and had"","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 } }
but the same query working for the phrase "Rasheed Wallace tied"
{ "query_string" : {"query" : "_text:"Rasheed Wallace tied
"","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 } }
How to solve this issue...?
I want to highlight the searched content whatever it is.... Is there
any possibilites...?
ofavre
(ofavre)
July 13, 2011, 3:57pm
2
I think it comes from the phrase query.
A query string with a quoted content won't work, a text_phrase query won't
either.
I guess it has to do with the following file:
modules/elasticsearch/src/main/java/org/apache/lucene/search/vectorhighlight/CustomFieldQuery.java
in the flatten() function.
--
Olivier Favre
www.yakaz.com
2011/6/16 senthil prabhu senthilsebi@gmail.com
Hi all,
Highlight not working for the below query (query_string)
{ "query_string" : {"query" : "_text:"Rasheed Wallace tied a season
high with 25 points and had"","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 } }
but the same query working for the phrase "Rasheed Wallace tied"
{ "query_string" : {"query" : "_text:"Rasheed Wallace tied
"","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 } }
How to solve this issue...?
I want to highlight the searched content whatever it is.... Is there
any possibilites...?
Le 13 juil. 2011 à 17:57, Olivier Favre a écrit :
I think it comes from the phrase query.
A query string with a quoted content won't work, a text_phrase query won't either.
I guess it has to do with the following file:
modules/elasticsearch/src/main/java/org/apache/lucene/search/vectorhighlight/CustomFieldQuery.java
in the flatten() function.
It has been fixed with my patch:
elastic:master
← hibnico:master
opened 11:39AM - 27 Jun 11 UTC
Prefix queries needs to be rewritten so the highlighter can work. So the pull re… quest.
The highlight of prefix queries doesn't highlight the prefix but the full word. I have written some code on the client side to change the highlighted words. For instance, searching "ski", lucene highlight "<>skiing</>", "<>skin</>" or "<>skills</>". So my code change the highlighted parts to be: "<>ski</>in", "<>ski</>n" or "<>ski</>lls". This code may be interesting to be on the server part, but I don't know where. If you think it is interesting, let me know.
Nicolas
--
Olivier Favre
www.yakaz.com
2011/6/16 senthil prabhu senthilsebi@gmail.com
Hi all,
Highlight not working for the below query (query_string)
{ "query_string" : {"query" : "_text:"Rasheed Wallace tied a season
high with 25 points and had"","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 } }
but the same query working for the phrase "Rasheed Wallace tied"
{ "query_string" : {"query" : "_text:"Rasheed Wallace tied
"","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 } }
How to solve this issue...?
I want to highlight the searched content whatever it is.... Is there
any possibilites...?