lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Isaac Hebsh (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SOLR-5560) Enable LocalParams without escaping the query
Date Thu, 26 Dec 2013 18:11:53 GMT

     [ https://issues.apache.org/jira/browse/SOLR-5560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Isaac Hebsh updated SOLR-5560:
------------------------------

    Fix Version/s: 4.7

> Enable LocalParams without escaping the query
> ---------------------------------------------
>
>                 Key: SOLR-5560
>                 URL: https://issues.apache.org/jira/browse/SOLR-5560
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.6
>            Reporter: Isaac Hebsh
>             Fix For: 4.7, 4.6.1
>
>
> This query should be a legit syntax:
> http://localhost:8983/solr/collection1/select?debugQuery=true&defType=lucene&df=id&q=TERM1
AND {!lucene df=text}(TERM2 TERM3 "TERM4 TERM5")
> currently it isn't, because the LocalParams can be specified on a single term only.
> [~billnbell] thinks it is a bug.
> From the mailing list:
> {quote}
> 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=TERM1
AND {!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=TERM1
AND _query_:"{!lucene df=text}TERM2 TERM3 \"TERM4 TERM5\""
> (parsedquery is exactly the same).
> 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.
> 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=TERM1
AND {!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.
> {quote}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message