lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Khludnev <mkhlud...@griddynamics.com>
Subject Re: Escaping characters in a nested query
Date Sat, 27 Feb 2016 10:26:35 GMT
Hello,

I suggest q=_query_:{!lucene v=$subq}&subq=my_awesome:less%20pain&...
or even starting for some version (I don't remember) _query_ pseudo field
is not necessary ie q=foo +bar {!lucene
v=$subq}&subq=my_awesome:less%20pain&


On Fri, Feb 26, 2016 at 10:38 PM, Jamie Johnson <jej2003@gmail.com> wrote:

> When using nested queries of the form q=_query_:"my_awesome:query", what
> needs to be escaped in the query portion?  Just using the admin UI the
> following works
>
> _query_:"+field\\:with\\:special"
> _query_:"+field\\:with\\~special"
> _query_:"+field\\:with\\&special"
>
> but the same doesn't work for quotes, i.e.
>
> _query_:"+field\\:with\\"special"
>
> throws a org.apache.solr.search.SyntaxError.  If I do
>
> _query_:"+field\\:with\\\"special" it executes, though I am not sure why
> quotes require different escaping.
>
> I am currently running solr 4.10.4, any thoughts?
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mkhludnev@griddynamics.com>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message