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?
>

Reply via email to