Search using speical characater

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

And if you execute it with pagecount:[2 TO 4] or pagecount:{2 TO 4} it
works? If I am not mistaken, the query parser does not allow to mix { or }
with [ or ]. You can use the range query explicitly in the query DSL to
support that.

On Tue, Nov 9, 2010 at 7:50 AM, srrIN srrranga@gmail.com wrote:

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

View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Search-using-speical-characater-tp1867290p1867290.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

Hi Kimchy,
Thanks for getting back to me.

pagecount:[2 TO 4] or pagecount:{2 TO 4} is working fine there is no issue. As I explained mixing curly and square bracket the issue.

-SRR

Support for mixing curl and square brackets will be supported in the next
version of Lucene (as far as I can tell). You can use the explicit range
query definition (defined within the search body of a search request) to
specify different inclusion of upper and lower bounds.

-shay.banon

On Wed, Nov 10, 2010 at 1:04 PM, srrIN srrranga@gmail.com wrote:

Hi Kimchy,
Thanks for getting back to me.

pagecount:[2 TO 4] or pagecount:{2 TO 4} is working fine there is no issue.
As I explained mixing curly and square bracket the issue.

-SRR

View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Search-using-speical-characater-tp1867290p1875312.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.

Hi shay.banon
Thank you for getting back.

Currently I m using query dsl with inclusion and exclusion, since I m unable to find a solution for mixing braces. So mixing the braces in next version will be added advantage and looking for the next release.

Thank you.
-SRR

The mixed range query is already supported by the latest lucene. When do you expect ElasticSearch to support that?

Thanks.

What do you mean by mixed range query? You mean the range query parser
syntax?

On Fri, Mar 23, 2012 at 11:01 PM, Woland sasha.la@gmail.com wrote:

The mixed range query is already supported by the latest lucene. When do
you
expect Elasticsearch to support that?

Thanks.

--
View this message in context:
http://elasticsearch-users.115913.n3.nabble.com/Search-using-speical-characater-tp1867290p3852781.html
Sent from the Elasticsearch Users mailing list archive at Nabble.com.