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

James Dyer updated SOLR-4333:
-----------------------------

    Attachment: SOLR-4333.patch

Here is an improved test that shows off the problem a little better.  This 
happens when you are using boolean syntax with edismax.  Either the default 
query field or the singular field listed in "qf" need to be non-analyzed.

Given: 

q=text_sw:(theos OR hasa\:colon OR theou)&qf=id

Get back:

{code:xml}
<str name="parsedquery_toString">+(text_sw:theo (id:OR) (id:hasa:colon) (id:OR) 
(id:theou)))</str>
{code}

It fails a little differently if you use an analyzed field in "qf" (or as 
default)...With:
q=text_sw:(theos OR hasa\:colon OR theou)&qf=text

Get back:
{code:xml}
<str name="parsedquery_toString">+(text_sw:theo (text:"hasa colon") 
(text:theou))</str>
{code}

note the switch from "text_sw" to "text".  In either case, removing the colon, 
or not escaping it resolves the issue.  But it would be best if clients could 
send escaped colons like this so as to prevent users from using colons with 
real field names (but allowing application code to do so).



                
> edismax query with escaped colon ignores AND and OR
> ---------------------------------------------------
>
>                 Key: SOLR-4333
>                 URL: https://issues.apache.org/jira/browse/SOLR-4333
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.0
>         Environment: tomcat 7.34
> java 7u11
> windows 2008R2
>            Reporter: Robert J. van der Boon
>         Attachments: SOLR-4333.patch, SOLR-4333.patch
>
>
> When I use the edismax query handler with qf=samenvatting and have a query of 
> the form
> {noformat}
> a\:b AND cde
> {noformat}
> then the parsedquery ends up as:
> {noformat}
> (+(DisjunctionMaxQuery((samenvatting:"a b")) 
> DisjunctionMaxQuery((samenvatting:and)) 
> DisjunctionMaxQuery((samenvatting:cde))))/no_coord
> {noformat}
> note that the AND operator is ignored, and a search for the word AND is 
> performed.
> As far as I've seen it doesn't matter if the part before the \: is a real 
> field or not.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to