[ 
https://issues.apache.org/jira/browse/SOLR-6320?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14085491#comment-14085491
 ] 

Esteban D commented on SOLR-6320:
---------------------------------

Maybe this is not a bug I noticed that the and is declared twice. The logic 
tokenizes a sentences into words concatenated with *AND*,

h4. This breaks:
{code}org_name_html:( military AND veterans AND museum AND and AND education 
AND center ){code}

h4. This works:
{code}org_name_html:( military AND veterans AND museum AND education AND center 
){code}

> ExtendedDismaxQParser (edismax) parser fails on some queries
> ------------------------------------------------------------
>
>                 Key: SOLR-6320
>                 URL: https://issues.apache.org/jira/browse/SOLR-6320
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>    Affects Versions: 4.5
>         Environment: Sun Microsystems Inc. OpenJDK 64-Bit Server VM (1.6.0_31 
> 23.25-b01)
> Apache Tomcat/6.0.35  
> Java 1.6.0_31-b31
>            Reporter: Esteban D
>
>  When querying for some specific attributes parsing fails and it falls back 
> to use the default search field *aggregatefield*.
> h3. This works as expected
> {code:title=debug|borderStyle=solid}
> "rawquerystring": "*:* AND org_name_html:military AND 
> affiliateorganizationid:\"0087\" AND volunteersslots:[1 TO *]",
> "querystring": "*:* AND org_name_html:military AND 
> affiliateorganizationid:\"0087\" AND volunteersslots:[1 TO *]",
> "parsedquery": "(+(+MatchAllDocsQuery(*:*) +org_name_html:militari 
> +affiliateorganizationid:0087 +volunteersslots:[1 TO *]))/no_coord",
>     "parsedquery_toString": "+(+*:* +org_name_html:militari 
> +affiliateorganizationid:0087 +volunteersslots:[1 TO *])",
>     "explain": {
>       "71f3083d53e356b810cf31224f5de00e": "
> 5.118334 = (MATCH) sum of:
>   0.08731608 = (MATCH) MatchAllDocsQuery, product of:
>     0.08731608 = queryNorm
>   2.1114364 = (MATCH) weight(org_name_html:militari in 34264) 
> [DefaultSimilarity], result of:
>     2.1114364 = score(doc=34264,freq=1.0 = termFreq=1.0
> ), product of:
>       0.85874873 = queryWeight, product of:
>         9.834944 = idf(docFreq=17, maxDocs=123663)
>         0.08731608 = queryNorm
>       2.458736 = fieldWeight in 34264, product of:
>         1.0 = tf(freq=1.0), with freq of:
>           1.0 = termFreq=1.0
>         9.834944 = idf(docFreq=17, maxDocs=123663)
>         0.25 = fieldNorm(doc=34264)
>   2.8322654 = (MATCH) weight(affiliateorganizationid:0087 in 34264) 
> [DefaultSimilarity], result of:
>     2.8322654 = score(doc=34264,freq=1.0 = termFreq=1.0
> ), product of:
>       0.497295 = queryWeight, product of:
>         5.6953425 = idf(docFreq=1129, maxDocs=123663)
>         0.08731608 = queryNorm
>       5.6953425 = fieldWeight in 34264, product of:
>         1.0 = tf(freq=1.0), with freq of:
>           1.0 = termFreq=1.0
>         5.6953425 = idf(docFreq=1129, maxDocs=123663)
>         1.0 = fieldNorm(doc=34264)
>   0.08731608 = (MATCH) ConstantScore(volunteersslots:[1 TO *]), product of:
>     1.0 = boost
>     0.08731608 = queryNorm
> ",
>       "b36156ebd7204985f752f1c191ea4d18": "
> 5.118334 = (MATCH) sum of:
>   0.08731608 = (MATCH) MatchAllDocsQuery, product of:
>     0.08731608 = queryNorm
>   2.1114364 = (MATCH) weight(org_name_html:militari in 34265) 
> [DefaultSimilarity], result of:
>     2.1114364 = score(doc=34265,freq=1.0 = termFreq=1.0
> ), product of:
>       0.85874873 = queryWeight, product of:
>         9.834944 = idf(docFreq=17, maxDocs=123663)
>         0.08731608 = queryNorm
>       2.458736 = fieldWeight in 34265, product of:
>         1.0 = tf(freq=1.0), with freq of:
>           1.0 = termFreq=1.0
>         9.834944 = idf(docFreq=17, maxDocs=123663)
>         0.25 = fieldNorm(doc=34265)
>   2.8322654 = (MATCH) weight(affiliateorganizationid:0087 in 34265) 
> [DefaultSimilarity], result of:
>     2.8322654 = score(doc=34265,freq=1.0 = termFreq=1.0
> ), product of:
>       0.497295 = queryWeight, product of:
>         5.6953425 = idf(docFreq=1129, maxDocs=123663)
>         0.08731608 = queryNorm
>       5.6953425 = fieldWeight in 34265, product of:
>         1.0 = tf(freq=1.0), with freq of:
>           1.0 = termFreq=1.0
>         5.6953425 = idf(docFreq=1129, maxDocs=123663)
>         1.0 = fieldNorm(doc=34265)
>   0.08731608 = (MATCH) ConstantScore(volunteersslots:[1 TO *]), product of:
>     1.0 = boost
>     0.08731608 = queryNorm
> "
>     },
>     "QParser": "ExtendedDismaxQParser",
>     "altquerystring": null,
>     "boost_queries": null,
>     "parsed_boost_queries": [],
>     "boostfuncs": null,
> {code}
> h3. When adding additional conditions to org_name_html it fails
> {code:title=debug|borderStyle=solid}
> "rawquerystring": "*:* AND affiliateorganizationid:\"0087\" AND 
> org_name_html:( military AND veterans AND museum AND and AND education AND 
> center ) AND volunteersslots:[1 TO *]",
> "querystring": "*:* AND affiliateorganizationid:\"0087\" AND org_name_html:( 
> military AND veterans AND museum AND and AND education AND center ) AND 
> volunteersslots:[1 TO *]",
> "parsedquery": "(+((affiliateorganizationid:0087 
> DisjunctionMaxQuery((aggregatefield:militari)) 
> DisjunctionMaxQuery((aggregatefield:veteran)) 
> DisjunctionMaxQuery((aggregatefield:museum)) 
> DisjunctionMaxQuery((aggregatefield:educ)) 
> DisjunctionMaxQuery((aggregatefield:center)) 
> DisjunctionMaxQuery((aggregatefield:to)))~7))/no_coord",
> "parsedquery_toString": "+((affiliateorganizationid:0087 
> (aggregatefield:militari) (aggregatefield:veteran) (aggregatefield:museum) 
> (aggregatefield:educ) (aggregatefield:center) (aggregatefield:to))~7)",
> "explain": {},
> "QParser": "ExtendedDismaxQParser",
> "altquerystring": null,
> "boost_queries": null,
> "parsed_boost_queries": [],
> "boostfuncs": null,
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to