Re: Boosting exact match fields.
In addition to what was proposed We use the technic described here https://github.com/cominvent/exactmatch and it works quite well. Best regards Elisabeth 2016-06-15 16:32 GMT+02:00 Alessandro Benedetti : > In addition to what Erick correctly proposed, > are you storing norms for your field of interest ( to boost documents with > shorter field values )? > If you are, I find suspicious "Sony Ear Phones" to win over "Ear Phones" > for your "Ear Phones" query. > What are the other factors currently involved in your relevancy score > calculus ? > > Cheers > > On Tue, Jun 14, 2016 at 4:48 PM, Erick Erickson > wrote: > > > If these are the complete field, i.e. your document > > contains exactly "ear phones" and not "ear phones > > are great" use a copyField to put it into an "exact_match" > > field that uses a much simpler analysis chain based > > on KeywordTokenizer (plus, perhaps things like > > lowercaseFilter, maybe strip punctuation and the like". > > Then you add a clause on exact_match boosted > > really high. > > > > Best, > > Erick > > > > On Tue, Jun 14, 2016 at 1:01 AM, Naveen Pajjuri > > wrote: > > > Hi, > > > > > > I have documents with a field (data type definition for that field is > > > below) values as ear phones, sony ear phones, philips ear phones. when > i > > > query for earphones sony ear phones is the top result where as i want > ear > > > phones as top result. please suggest how to boost exact matches. PS: I > > have > > > earphones => ear phones in my synonyms.txt and the datatype definition > > for > > > that field keywords is > > positionIncrementGap="100"> > > "solr.WhitespaceTokenizerFactory"/> > class="solr.StopFilterFactory" > > > ignoreCase="true" words="stopwords.txt"/> > > "solr.LowerCaseFilterFactory"/> class="solr.SynonymFilterFactory" > > > synonyms="synonyms.txt" ignoreCase="true" expand="true"/> class= > > > "solr.RemoveDuplicatesTokenFilterFactory"/> > > "query"> > class= > > > "solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/> > > > > class="solr.SynonymFilterFactory" synonyms="synonyms.txt" > > ignoreCase="true" > > > expand="true"/> > class= > > > "solr.RemoveDuplicatesTokenFilterFactory"/> > > REGARDS, > > > Naveen > > > > > > -- > -- > > Benedetti Alessandro > Visiting card : http://about.me/alessandro_benedetti > > "Tyger, tyger burning bright > In the forests of the night, > What immortal hand or eye > Could frame thy fearful symmetry?" > > William Blake - Songs of Experience -1794 England >
Re: Boosting exact match fields.
In addition to what Erick correctly proposed, are you storing norms for your field of interest ( to boost documents with shorter field values )? If you are, I find suspicious "Sony Ear Phones" to win over "Ear Phones" for your "Ear Phones" query. What are the other factors currently involved in your relevancy score calculus ? Cheers On Tue, Jun 14, 2016 at 4:48 PM, Erick Erickson wrote: > If these are the complete field, i.e. your document > contains exactly "ear phones" and not "ear phones > are great" use a copyField to put it into an "exact_match" > field that uses a much simpler analysis chain based > on KeywordTokenizer (plus, perhaps things like > lowercaseFilter, maybe strip punctuation and the like". > Then you add a clause on exact_match boosted > really high. > > Best, > Erick > > On Tue, Jun 14, 2016 at 1:01 AM, Naveen Pajjuri > wrote: > > Hi, > > > > I have documents with a field (data type definition for that field is > > below) values as ear phones, sony ear phones, philips ear phones. when i > > query for earphones sony ear phones is the top result where as i want ear > > phones as top result. please suggest how to boost exact matches. PS: I > have > > earphones => ear phones in my synonyms.txt and the datatype definition > for > > that field keywords is > positionIncrementGap="100"> > "solr.WhitespaceTokenizerFactory"/> class="solr.StopFilterFactory" > > ignoreCase="true" words="stopwords.txt"/> > "solr.LowerCaseFilterFactory"/> > synonyms="synonyms.txt" ignoreCase="true" expand="true"/> > "solr.RemoveDuplicatesTokenFilterFactory"/> > "query"> class= > > "solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/> > > class="solr.SynonymFilterFactory" synonyms="synonyms.txt" > ignoreCase="true" > > expand="true"/> class= > > "solr.RemoveDuplicatesTokenFilterFactory"/> > REGARDS, > > Naveen > -- -- Benedetti Alessandro Visiting card : http://about.me/alessandro_benedetti "Tyger, tyger burning bright In the forests of the night, What immortal hand or eye Could frame thy fearful symmetry?" William Blake - Songs of Experience -1794 England
Re: Boosting exact match fields.
If these are the complete field, i.e. your document contains exactly "ear phones" and not "ear phones are great" use a copyField to put it into an "exact_match" field that uses a much simpler analysis chain based on KeywordTokenizer (plus, perhaps things like lowercaseFilter, maybe strip punctuation and the like". Then you add a clause on exact_match boosted really high. Best, Erick On Tue, Jun 14, 2016 at 1:01 AM, Naveen Pajjuri wrote: > Hi, > > I have documents with a field (data type definition for that field is > below) values as ear phones, sony ear phones, philips ear phones. when i > query for earphones sony ear phones is the top result where as i want ear > phones as top result. please suggest how to boost exact matches. PS: I have > earphones => ear phones in my synonyms.txt and the datatype definition for > that field keywords is positionIncrementGap="100"> "solr.WhitespaceTokenizerFactory"/> ignoreCase="true" words="stopwords.txt"/> "solr.LowerCaseFilterFactory"/> synonyms="synonyms.txt" ignoreCase="true" expand="true"/> "solr.RemoveDuplicatesTokenFilterFactory"/> "query"> "solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"/> class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" > expand="true"/> "solr.RemoveDuplicatesTokenFilterFactory"/> REGARDS, > Naveen
Boosting exact match fields.
Hi, I have documents with a field (data type definition for that field is below) values as ear phones, sony ear phones, philips ear phones. when i query for earphones sony ear phones is the top result where as i want ear phones as top result. please suggest how to boost exact matches. PS: I have earphones => ear phones in my synonyms.txt and the datatype definition for that field keywords is REGARDS, Naveen