*"I think that AND might work as well with simple query string"*

Tried just now. Doesn't work, it gets treated as a search term instead of
an operator, so is functionally equivalent to "and" in query_string. I
*could* try translating operators, but a truly robust implementation of
that is more work than I would have liked.

On 7 May 2015 at 15:35, David Pilato <da...@pilato.fr> wrote:

> No that's fine to keep this thread here.
> Well with query_string you can also use +
>
> I did not check but I think that AND might work as well with simple query
> string. It's not?
>
> David
>
> Le 7 mai 2015 à 07:14, Snixtor <snix...@gmail.com> a écrit :
>
> Regarding the discussion forum, I noticed literally 1 minute after posting
> this message. Should I duplicate this question in the forum? Can it be
> moved from the discussion group into the forum? The "we have moved" FAQ
> didn't address this matter of "transition".
>
> Regarding simple_query_string, I'm not as fond of the syntax. My
> application is transitioning from another text search system to
> Elasticsearch, and the syntax of query_string is a closer match to what
> users are familiar with. For example, query_string uses "AND", while
> simple_query_string uses "+". For the user base, that's possibly a
> *bigger* issue than big error messages.
>
>
>
> On Thursday, 7 May 2015 15:01:55 UTC+10, David Pilato wrote:
>>
>> Try simple_query_string.
>>
>> BTW we moved to https://discuss.elastic.co/
>>
>> David
>>
>> Le 7 mai 2015 à 06:56, Snixtor <sni...@gmail.com> a écrit :
>>
>> I have an application allowing users to specify the "query" value of a
>> "query_string" query. If the user inputs invalid search syntax, e.g. their
>> search is only "AND" (an operator without any values), Elasticsearch
>> returns an *exceedingly* verbose error message with very user-unfriendly
>> text like "failed to execute phase" and "shard failure", when what I really
>> want is a simple user-friendly error like "Bad search syntax". In this
>> particular example, text within the "QueryParsingException" sections is
>> close to what I'm looking for.
>>
>> QueryParsingException[[<index_name>] Failed to parse query [AND]]
>>
>> But it's buried in a sea of text. I could parse out any text within the
>> QueryParsingException, but frankly that feels like reverse-engineering.
>> Will *all* queries with bad syntax have user-friendly error text like
>> this particular example? Is the most user-friendly message always likely to
>> appear within QueryParsingException? Are there other error scenarios I
>> might want to handle that don't even have a QueryParsingException?
>>
>> I've been digging through Elasticsearch documentation for some
>> explanation of the kinds of errors I might expect and what format those
>> error messages will be in, but I'm coming up blank. For what it's worth,
>> I'm integrating using the .NET client *NEST*.
>>
>> --
>> Please update your bookmarks! We moved to https://discuss.elastic.co/
>> ---
>> 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 elasticsearc...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/elasticsearch/94d494a5-9d97-4ace-ab6a-7ba9d1f05734%40googlegroups.com
>> <https://groups.google.com/d/msgid/elasticsearch/94d494a5-9d97-4ace-ab6a-7ba9d1f05734%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>  --
> Please update your bookmarks! We moved to https://discuss.elastic.co/
> ---
> 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/c4cfd193-ae36-44fe-bb94-aad0dd374c5d%40googlegroups.com
> <https://groups.google.com/d/msgid/elasticsearch/c4cfd193-ae36-44fe-bb94-aad0dd374c5d%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>  --
> Please update your bookmarks! We moved to https://discuss.elastic.co/
> ---
> 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/CSmm9zdw1dM/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/E18DB6FC-7FA1-4A84-AC73-D80113AD19FB%40pilato.fr
> <https://groups.google.com/d/msgid/elasticsearch/E18DB6FC-7FA1-4A84-AC73-D80113AD19FB%40pilato.fr?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Please update your bookmarks! We moved to https://discuss.elastic.co/
--- 
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/CANsC95qnEtcfTORTs%3DFq-qSuHFn3-eeEiv2UC36HLq12eHsv1Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to