Default query operator OR wont work in some cases
Hi, I have some documents with keywords egg and some with salad and some with egg salad. When I search for egg salad, I expect to see egg results + salad results. I dont see them. egg and salad queries individually work fine. I am using whitespacetokenizer. Not sure if I am missing something. Thanks, -Manasi -- View this message in context: http://lucene.472066.n3.nabble.com/Default-query-operator-OR-wont-work-in-some-cases-tp4086624.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Default query operator OR wont work in some cases
Try adding debug=query to your URL, that'll show you how the parsing actually happened and should give you some pointers. Best, Erick On Mon, Aug 26, 2013 at 9:55 AM, smanad sma...@gmail.com wrote: Hi, I have some documents with keywords egg and some with salad and some with egg salad. When I search for egg salad, I expect to see egg results + salad results. I dont see them. egg and salad queries individually work fine. I am using whitespacetokenizer. Not sure if I am missing something. Thanks, -Manasi -- View this message in context: http://lucene.472066.n3.nabble.com/Default-query-operator-OR-wont-work-in-some-cases-tp4086624.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Default query operator OR wont work in some cases
here is keywords field for 3 docs, Simply Asia products,Simply Asia,Sesame Chicken Egg Drop Soup,Soy Ginger Shrimp and Noodle Salad,Sesame Teriyaki Noodle Bowl Eggs,AllWhites,Better'n Eggs,Foods,AllWhites or Better'n Eggs DOLE Salad Blend Salad Kit,Salad Kit,Salad,DOLE,produce Here is my debug query: str name=parsedquery(+((DisjunctionMaxQuery((keywords:egg^2.0)~0.1) DisjunctionMaxQuery((keywords:salad^2.0)~0.1))~2) DisjunctionMaxQuery((keywords:egg salad)~0.1) /no_coord/str Here is my fieldtype definition for keywords, fieldType name=text_general class=solr.TextField positionIncrementGap=100 analyzer type=index tokenizer class=solr.WhitespaceTokenizerFactory/ filter class=solr.LowerCaseFilterFactory/ filter class=solr.StopFilterFactory ignoreCase=true words=stopwords.txt enablePositionIncrements=true / filter class=solr.SynonymFilterFactory synonyms=synonyms.txt ignoreCase=true expand=true/ filter class=solr.WordDelimiterFilterFactory generateWordParts=1 generateNumberParts=1 catenateWords=1 catenateNumbers=1 catenateAll=0 splitOnCaseChange=1 types=word-delim-types.txt / filter class=solr.EnglishMinimalStemFilterFactory/ /analyzer analyzer type=query tokenizer class=solr.WhitespaceTokenizerFactory/ filter class=solr.LowerCaseFilterFactory/ filter class=solr.StopFilterFactory ignoreCase=true words=stopwords.txt enablePositionIncrements=true / filter class=solr.SynonymFilterFactory synonyms=synonyms.txt ignoreCase=true expand=true/ filter class=solr.WordDelimiterFilterFactory generateWordParts=1 generateNumberParts=1 catenateWords=1 catenateNumbers=1 catenateAll=0 splitOnCaseChange=1 types=word-delim-types.txt / filter class=solr.EnglishMinimalStemFilterFactory/ /analyzer /fieldType -- View this message in context: http://lucene.472066.n3.nabble.com/Default-query-operator-OR-wont-work-in-some-cases-tp4086624p4086723.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Default query operator OR wont work in some cases
The phrase egg salad does not occur in your input. And, quoted phrases are an implicit AND, not an OR. Either you wanted egg and salad but not as a phrase, or as a very loose sloppy phrase, such as egg salad~10. Or, who knows what you really want - your requirements are expressed too imprecisely. -- Jack Krupansky -Original Message- From: smanad Sent: Monday, August 26, 2013 8:50 PM To: solr-user@lucene.apache.org Subject: Re: Default query operator OR wont work in some cases here is keywords field for 3 docs, Simply Asia products,Simply Asia,Sesame Chicken Egg Drop Soup,Soy Ginger Shrimp and Noodle Salad,Sesame Teriyaki Noodle Bowl Eggs,AllWhites,Better'n Eggs,Foods,AllWhites or Better'n Eggs DOLE Salad Blend Salad Kit,Salad Kit,Salad,DOLE,produce Here is my debug query: str name=parsedquery(+((DisjunctionMaxQuery((keywords:egg^2.0)~0.1) DisjunctionMaxQuery((keywords:salad^2.0)~0.1))~2) DisjunctionMaxQuery((keywords:egg salad)~0.1) /no_coord/str Here is my fieldtype definition for keywords, fieldType name=text_general class=solr.TextField positionIncrementGap=100 analyzer type=index tokenizer class=solr.WhitespaceTokenizerFactory/ filter class=solr.LowerCaseFilterFactory/ filter class=solr.StopFilterFactory ignoreCase=true words=stopwords.txt enablePositionIncrements=true / filter class=solr.SynonymFilterFactory synonyms=synonyms.txt ignoreCase=true expand=true/ filter class=solr.WordDelimiterFilterFactory generateWordParts=1 generateNumberParts=1 catenateWords=1 catenateNumbers=1 catenateAll=0 splitOnCaseChange=1 types=word-delim-types.txt / filter class=solr.EnglishMinimalStemFilterFactory/ /analyzer analyzer type=query tokenizer class=solr.WhitespaceTokenizerFactory/ filter class=solr.LowerCaseFilterFactory/ filter class=solr.StopFilterFactory ignoreCase=true words=stopwords.txt enablePositionIncrements=true / filter class=solr.SynonymFilterFactory synonyms=synonyms.txt ignoreCase=true expand=true/ filter class=solr.WordDelimiterFilterFactory generateWordParts=1 generateNumberParts=1 catenateWords=1 catenateNumbers=1 catenateAll=0 splitOnCaseChange=1 types=word-delim-types.txt / filter class=solr.EnglishMinimalStemFilterFactory/ /analyzer /fieldType -- View this message in context: http://lucene.472066.n3.nabble.com/Default-query-operator-OR-wont-work-in-some-cases-tp4086624p4086723.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Default query operator OR wont work in some cases
I am not searching for phrase query, I am not sure why it shows up in parsedquery. lst name=responseHeader int name=status0/int int name=QTime3/int lst name=params str name=debugQuerytrue/str str name=indenttrue/str str name=qegg salad /str str name=_1377569284170/str str name=wtxml/str /lst /lst -- View this message in context: http://lucene.472066.n3.nabble.com/Default-query-operator-OR-wont-work-in-some-cases-tp4086624p4086732.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: Default query operator OR wont work in some cases
Yeah, sorry, I read the parsed query too quickly - the phrase is the optional relevancy boost due to the pf2 parameter. -- Jack Krupansky -Original Message- From: smanad Sent: Monday, August 26, 2013 10:08 PM To: solr-user@lucene.apache.org Subject: Re: Default query operator OR wont work in some cases I am not searching for phrase query, I am not sure why it shows up in parsedquery. lst name=responseHeader int name=status0/int int name=QTime3/int lst name=params str name=debugQuerytrue/str str name=indenttrue/str str name=qegg salad /str str name=_1377569284170/str str name=wtxml/str /lst /lst -- View this message in context: http://lucene.472066.n3.nabble.com/Default-query-operator-OR-wont-work-in-some-cases-tp4086624p4086732.html Sent from the Solr - User mailing list archive at Nabble.com.