You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Jan Høydahl (Jira)" <ji...@apache.org> on 2022/06/01 18:08:00 UTC
[jira] [Commented] (SOLR-16227) Solr SQL query parsing fails on multiple LIKE clauses and multiple terms
[ https://issues.apache.org/jira/browse/SOLR-16227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17545074#comment-17545074 ]
Jan Høydahl commented on SOLR-16227:
------------------------------------
Thanks for the report. Are you skilled in Java and able to submit a Pull Request for this?
> Solr SQL query parsing fails on multiple LIKE clauses and multiple terms
> ------------------------------------------------------------------------
>
> Key: SOLR-16227
> URL: https://issues.apache.org/jira/browse/SOLR-16227
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: Parallel SQL
> Affects Versions: 9.0, 8.11.1
> Reporter: Kiran
> Priority: Major
> Fix For: 8.11.2, 9.1
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
>
> {code:java}
> select count(*) as QUERY_COUNT from test_index WHERE (name LIKE 'Sample Temp*') AND (deploy_id LIKE 'aws*') HAVING count(*) >= 0{code}
>
> Above query fails with error
> {color:#ff0000}{color}
> {code:java}
> "msg":"org.apache.solr.search.SyntaxError: org.apache.lucene.queryparser.classic.ParseException: Cannot parse 'name:\"Sample': Lexical error at line 1, column 13. Encountered: <EOF> after : \"\\\"Sample\"",{code}
> {color:#ff0000}{color}
>
> The bug is in SolrFilter which translates the query as
> {color:#ff0000}{color}
> {code:java}
> ({!complexphrase}name:"Sample Temp*" AND deploy_id:aws*){code}
> {color:#ff0000}{color}
> which fails because of local params parsing (?) I think
> If Solr SQL rewrites the query as
> {code:java}
> ({!complexphrase v="name:\"Sample Temp*\"" AND deploy_id:aws*) {code}
>
> it works
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org