Search using Special Character


(srrin) #1

Hi ,
I have a search request which passes lucene query string as search criteria as like
pagecount:{2 TO 4] which is produced from lucenes constantsearchrangequery. Since I m having "{" is in the search criteria I am unable to suceed. My full search request using JSON is as follows

curl -XGET 'http://localhost/db25/_search' -d '{ "query" : { "query_string" : { "default_field" : "", "query" : "+(pagecount:{2 TO 4])","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" : 0, "facets" : {"tag_reviewstatus" : { "terms" : { "field" :"_reviewstatus","size" : 10 } } , "global" : false }, "explain" : false }'

Once I pass this request in CURL I am getting ParseException as SEARCHPHASEEXECUTIONEXCEPTION.
Kindly help. Thanks in advance

-SRR


(system) #2