Sorry for the delayed response.

On Fri, Jan 10, 2014 at 3:43 PM, Jason Wee <peich...@gmail.com> wrote:

>
> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-query-string-query.html#_reserved_characters
>
>
imho, || could means OR or literary as it is. So if the library escape for
> you, when you mean || to OR, that's wrong.
>
>
Makes sense. However a character like " (double quote - when used like :
40" tv) will make elasticsearch fail outright with the message saying that
it was unable to parse the query.

Wrong search happening is somewhat ok and can be considered as user not
knowing how to use those operators, but an explicit error is a much worse
user behaviour, isn't it?

Could the library add some such query string sanitize feature?


> hth
>
> Jason
>
>
> On Fri, Jan 10, 2014 at 8:34 AM, Srirang Doddihal 
> <om.brahm...@gmail.com>wrote:
>
>> Hi,
>>
>> I tried out the elasticsearch Ruby gem today and found that it does not
>> escape the reserve characters when searching with the query_string query.
>>
>> As a library providing easy to use search API, wouldn't it be better if
>> the library escaped the reserve characters in this case?
>> The API can support a flag,  with a sensible default value, to enable or
>> disable this escaping behavior.
>>
>> Or is it an explicit design decision that the users themselves have to
>> escape the reserve characters before sending it to this library?
>>
>> I am using v0.4.5.
>>
>> Regards,
>> Brahmana
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "elasticsearch" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to elasticsearch+unsubscr...@googlegroups.com.
>>
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/0bc324f1-dc81-4640-aea0-1a3b08663f20%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "elasticsearch" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/elasticsearch/QsVgeOywOkk/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> elasticsearch+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/CAHO4itzMkB6Jv0EkfiXSB7528EPVN4Zwtp96bs5Of93mk%2BRnFg%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Regards,
Srirang G Doddihal
Brahmana.

The LIGHT shows the way.
The WISE see it.
The BRAVE walk it.
The PERSISTENT endure and complete it.

I want to do it all ALONE.

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CACBGNLt6OkUdEFN%2BFffc-AxfrrbV-2%3Difq5uWMQ1c0h3KsEgbw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to