How to change the weight of the fields ?
Hello, I'm stuck my the boost feature... I'm doing the following query : http://localhost:8983/solr/select/?q=novel&bf=title_s^5.0&fl=title_s+isbn_s&version=2.2&start=0&rows=5&indent=on&debugQuery=on Below a part of my debug (the results are correct) : novel novel text:novel text:novel − − 0.6041825 = (MATCH) fieldWeight(text:novel in 395), product of: 1.7320508 = tf(termFreq(text:novel)=3) 3.1892564 = idf(docFreq=55, numDocs=500) 0.109375 = fieldNorm(field=text, doc=395) − 0.51787066 = (MATCH) fieldWeight(text:novel in 443), product of: 1.7320508 = tf(termFreq(text:novel)=3) 3.1892564 = idf(docFreq=55, numDocs=500) 0.09375 = fieldNorm(field=text, doc=443) It seems Solr is only evaluating the 'text' field and skip the 'title_s' field. The line in the schema for dynamic string is : Do I need to enable something else to be able to change the weight of my fields? Thanks very much Vincent -- View this message in context: http://www.nabble.com/How-to-change-the-weight-of-the-fields---tp23619971p23619971.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to change the weight of the fields ?
Vincent, You need to add defType=dismax when using bf parameter. Please see: http://wiki.apache.org/solr/DisMaxRequestHandler Koji Vincent Pérès wrote: Hello, I'm stuck my the boost feature... I'm doing the following query : http://localhost:8983/solr/select/?q=novel&bf=title_s^5.0&fl=title_s+isbn_s&version=2.2&start=0&rows=5&indent=on&debugQuery=on Below a part of my debug (the results are correct) : novel novel text:novel text:novel − − 0.6041825 = (MATCH) fieldWeight(text:novel in 395), product of: 1.7320508 = tf(termFreq(text:novel)=3) 3.1892564 = idf(docFreq=55, numDocs=500) 0.109375 = fieldNorm(field=text, doc=395) − 0.51787066 = (MATCH) fieldWeight(text:novel in 443), product of: 1.7320508 = tf(termFreq(text:novel)=3) 3.1892564 = idf(docFreq=55, numDocs=500) 0.09375 = fieldNorm(field=text, doc=443) It seems Solr is only evaluating the 'text' field and skip the 'title_s' field. The line in the schema for dynamic string is : omitNorms="false" /> Do I need to enable something else to be able to change the weight of my fields? Thanks very much Vincent
Re: How to change the weight of the fields ?
Hello, I'm sorry I wrote a mistake, I mean : http://localhost:8983/solr/listings/select/?q=novel&qf=title_s^5.0&fl=title_s+isbn_s&version=2.2&start=0&rows=5&indent=on&debugQuery=on (using qf (Query Fields)) But it seems I need to add dismax as well and configure it by default in solr config? Thanks for your answer ! Vincent -- View this message in context: http://www.nabble.com/How-to-change-the-weight-of-the-fields---tp23619971p23631022.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to change the weight of the fields ?
I tried the following request after changed the dismax : http://localhost:8983/solr/listings/select/?q=novel&qt=dismax&qf=title_s^2.0&fl=title_s+isbn_s&version=2.2&start=0&rows=5&indent=on&debugQuery=on But I don't get any results : novel novel +DisjunctionMaxQuery((title_s:novel^2.0)~0.01) () +(title_s:novel^2.0)~0.01 () DismaxQParser − − 3.0 − 1.0 − 1.0 etc Do I need to add some specific attributes to my string fields? It looks now like this : and below : Thanks !! Vincent -- View this message in context: http://www.nabble.com/How-to-change-the-weight-of-the-fields---tp23619971p23631247.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to change the weight of the fields ?
It seems I can only search on the field 'text'. With the following url : http://localhost:8983/solr/select/?q=novel&qt=dismax&fl=title_s,id&version=2.2&start=0&rows=10&indent=on&debugQuery=on I get answers, but on the debug area, it seems it's only searching on the 'text' field (with or without 'qt' the results are displayed within the same order) : novel novel − +DisjunctionMaxQuery((text:novel^0.5 | title_s:novel^5.0 | id:novel^10.0)~0.01) () − +(text:novel^0.5 | title_s:novel^5.0 | id:novel^10.0)~0.01 () − − 0.014641666 = (MATCH) sum of: 0.014641666 = (MATCH) max plus 0.01 times others of: 0.014641666 = (MATCH) weight(text:novel^0.5 in 114927), product of: 0.01362607 = queryWeight(text:novel^0.5), product of: 0.5 = boost 3.4734163 = idf(docFreq=10634, numDocs=43213) 0.007845918 = queryNorm 1.0745333 = (MATCH) fieldWeight(text:novel in 114927), product of: 1.4142135 = tf(termFreq(text:novel)=2) 3.4734163 = idf(docFreq=10634, numDocs=43213) 0.21875 = fieldNorm(field=text, doc=114927) etc. I should have a debug below with a search of the term into 'title_s' and 'id' no? Thanks for your answers ! Vincent -- View this message in context: http://www.nabble.com/How-to-change-the-weight-of-the-fields---tp23619971p23649624.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: How to change the weight of the fields ?
Hi, I'm not sure why the rest of the scoring explanation is not shown, but your query *was* expanded to search on text and title_s, and id fields, so I think that expanded/rewritten query is what went to the index. Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message > From: Vincent Pérès > To: solr-user@lucene.apache.org > Sent: Thursday, May 21, 2009 4:34:00 AM > Subject: Re: How to change the weight of the fields ? > > > It seems I can only search on the field 'text'. With the following url : > http://localhost:8983/solr/select/?q=novel&qt=dismax&fl=title_s,id&version=2.2&start=0&rows=10&indent=on&debugQuery=on > > I get answers, but on the debug area, it seems it's only searching on the > 'text' field (with or without 'qt' the results are displayed within the same > order) : > > > novel > novel > − > > +DisjunctionMaxQuery((text:novel^0.5 | title_s:novel^5.0 | > id:novel^10.0)~0.01) () > > − > > +(text:novel^0.5 | title_s:novel^5.0 | id:novel^10.0)~0.01 () > > − > > − > > > 0.014641666 = (MATCH) sum of: > 0.014641666 = (MATCH) max plus 0.01 times others of: > 0.014641666 = (MATCH) weight(text:novel^0.5 in 114927), product of: > 0.01362607 = queryWeight(text:novel^0.5), product of: > 0.5 = boost > 3.4734163 = idf(docFreq=10634, numDocs=43213) > 0.007845918 = queryNorm > 1.0745333 = (MATCH) fieldWeight(text:novel in 114927), product of: > 1.4142135 = tf(termFreq(text:novel)=2) > 3.4734163 = idf(docFreq=10634, numDocs=43213) > 0.21875 = fieldNorm(field=text, doc=114927) > > etc..... > > I should have a debug below with a search of the term into 'title_s' and > 'id' no? > > Thanks for your answers ! > Vincent > -- > View this message in context: > http://www.nabble.com/How-to-change-the-weight-of-the-fields---tp23619971p23649624.html > Sent from the Solr - User mailing list archive at Nabble.com.