unclosed quotes in elasticsearch queries

40 views
Skip to first unread message

Bruce Durling

unread,
Nov 7, 2014, 4:52:53 AM11/7/14
to clojure-el...@googlegroups.com
I'm trying to use a query string with an unclosed quote with the elastisch native API.

I found this issue on the main elasticsearch github issues

https://github.com/elasticsearch/elasticsearch/issues/1387

Is there a recommended way to escape strings going into clojurewerkz.elastisch.native.document/search?

Should I use this?

http://reference.clojureelasticsearch.info/clojurewerkz.elastisch.escape.html#var-escape-query-string-characters

when doing query strings?

cheers,
Bruce

Michael Klishin

unread,
Nov 7, 2014, 4:08:22 PM11/7/14
to Bruce Durling, clojure-el...@googlegroups.com
On 8 November 2014 at 00:04:15, Bruce Durling (b...@otfrom.com) wrote:
> Is there a recommended way to escape strings going into clojurewerkz.elastisch.native.document/search?
>
> Should I use this?
> http://reference.clojureelasticsearch.info/clojurewerkz.elastisch.escape.html#var-escape-query-string-characters
>
> when doing query strings?

Yes, try that first. I think quote escaping in ES is pretty standard. 
--
@michaelklishin, github.com/michaelklishin
Reply all
Reply to author
Forward
0 new messages