[ https://issues.apache.org/jira/browse/SOLR-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13958157#comment-13958157 ]
Bob Laferriere commented on SOLR-5949: -------------------------------------- Yes. I am not doing that type of query. I am doing No AND Smoking AND Sign as the query. The quotes were intended to only highlight the search not intended to indicate that I was doing a phrase search. It is truly a boolean query on keywords and not a phrase search. > Stopwords in Boolean Query Result in invalid query > -------------------------------------------------- > > Key: SOLR-5949 > URL: https://issues.apache.org/jira/browse/SOLR-5949 > Project: Solr > Issue Type: Bug > Components: query parsers > Affects Versions: 4.3 > Environment: Linux > Reporter: Bob Laferriere > > This seems a repeat of SOLR-261 which was fixed in 1.3 but I am seeing the > same behavior described. When I have a stopword in a boolean query the > resulting query is invalid. > e.g. Document --> "No Smoking Sign" > Stopword: "No" > Query:"No AND Smoking AND Sign" > The resultant query is a boolean query with a blank field so an empty boolean > query. This is expanding as "? Smoking Sign" which then leads to no matches > as "?" AND "Smoking" AND "sign" has no match. > The expected behavior is to remove the empty boolean clause from the query. > In the Analysis tool the parsing showing that "No AND Smoking AND Sign" > analyzes to "Smoke Sign". I would expect the same behavior by the > QueryParser, but this is not true. The real parsed query is trying to do the > following: <empty boolean query> Smoke Sign. > The only workaround is to never allow stopwords in the query or turn off > stopwords entirely. -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org