lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anssi Törmä (JIRA) <>
Subject [jira] [Created] (SOLR-5435) An edismax query wrapped in parentheses parsed wrong
Date Mon, 11 Nov 2013 11:11:17 GMT
Anssi Törmä created SOLR-5435:

             Summary: An edismax query wrapped in parentheses parsed wrong
                 Key: SOLR-5435
             Project: Solr
          Issue Type: Bug
          Components: query parsers
    Affects Versions: 4.3.1
            Reporter: Anssi Törmä

I have an edismax query with the following parameters:
* q={{("jenkins " OR text:"jenkins")}}
** Yes, there is a space in {{"jenkins "}}
* qf={{used_name^7 text}}

Queries to the field {{used_name}} are analyzed like this
<analyzer type="query">
  <tokenizer class="solr.KeywordTokenizerFactory"/>
  <filter class="solr.PatternReplaceFilterFactory" 
       replacement=" "/>
  <filter class="solr.TrimFilterFactory"/>
  <filter class="solr.LowerCaseFilterFactory"/>
Queries to the field {{text}} are anayzed like this:
<analyzer type="query">
  <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  <filter class="solr.WordDelimiterFilterFactory"
  <filter class="solr.LowerCaseFilterFactory"/>
  <filter class="solr.ASCIIFoldingFilterFactory" />

In Solr admin console, I can see the query is parsed wrongly:
{{+((used_name:jenkins^7.0 | text:jenkins) (used_name:text:^7.0 | (text:text: text:text))
(used_name:jenkins^7.0 | text:jenkins))}}
See that {{(text:text: text:text)}}?

As a workaround I leave a space between parentheses and what they enclose, i.e. q={{( "jenkins
" OR text:"jenkins" )}}, then the query is parsed as I expect, i.e.
{{+((used_name:jenkins^7.0 | text:jenkins) text:jenkins)}}

The query is also parsed correctly if there's no space in {{"jenkins"}}.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message