lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Bell <billnb...@gmail.com>
Subject Re: LocalParam for nested query without escaping?
Date Tue, 10 Dec 2013 06:48:21 GMT
Sounds like a bug.


On Mon, Dec 9, 2013 at 1:16 PM, Isaac Hebsh <isaac.hebsh@gmail.com> wrote:

> If so, can someone suggest how a query should be escaped (securely and
> correctly)?
> Should I escape the quote mark (and backslash mark itself) only?
>
>
> On Fri, Dec 6, 2013 at 2:59 PM, Isaac Hebsh <isaac.hebsh@gmail.com> wrote:
>
> > Obviously, there is the option of external parameter ({...
> > v=$nestedq}&nestedq=...)
> >
> > This is a good solution, but it is not practical, when having a lot of
> > such nested queries.
> >
> > Any ideas?
> >
> > On Friday, December 6, 2013, Isaac Hebsh wrote:
> >
> >> We want to set a LocalParam on a nested query. When quering with "v"
> >> inline parameter, it works fine:
> >>
> >>
> http://localhost:8983/solr/collection1/select?debugQuery=true&defType=lucene&df=id&q=TERM1AND{!lucene
df=text v="TERM2 TERM3 \"TERM4 TERM5\""}
> >>
> >> the parsedquery_toString is
> >> +id:TERM1 +(text:term2 text:term3 text:"term4 term5")
> >>
> >> Query using the "_query_" also works fine:
> >>
> >>
> http://localhost:8983/solr/collection1/select?debugQuery=true&defType=lucene&df=id&q=TERM1AND_query_:"{!lucene
df=text}TERM2 TERM3 \"TERM4 TERM5\""
> >>
> >> (parsedquery is exactly the same).
> >>
> >>
> >> BUT, when trying to put the nested query in place, it yields syntax
> error:
> >>
> >>
> http://localhost:8983/solr/collection1/select?debugQuery=true&defType=lucene&df=id&q=TERM1AND{!lucene
df=text}(TERM2 TERM3 "TERM4 TERM5")
> >>
> >> org.apache.solr.search.SyntaxError: Cannot parse '(TERM2'
> >>
> >> The previous options are less preferred, because the escaping that
> should
> >> be made on the nested query.
> >>
> >> Can't I set a LocalParam to a nested query without escaping the query?
> >>
> >
>



-- 
Bill Bell
billnbell@gmail.com
cell 720-256-8076

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