[ https://issues.apache.org/jira/browse/SOLR-5560?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13864553#comment-13864553 ]
Isaac Hebsh commented on SOLR-5560: ----------------------------------- Hi [~ryancutter], thank you a lot! I'm not familiar with parser states (thank god), so I can't review the patch. What action is should be performed in order to commit this patch? (into 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 > > Attachments: SOLR-5560.patch > > > 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org