Re: solre scores remains same for exact match and nearly exact match
On 04/03/2013 07:22 AM, amit wrote: Below is my query http://localhost:8983/solr/select/?q=subject:session management in phpfq=category:[*%20TO%20*]fl=category,score,subject You specify that you want session to appear in field subject, but the other tokens only match to the default search field. Which one did you specify in your schema ? It is probable you actually wanted to do : q=subject:session subject:management subject:in subject:php Or written in a better way, specify Default query Field in your url : q=session management in phpdf=subject Or even better, use eDisMax if you need to search across multiple fields at once withqf=filed1,filed2,field3 : http://wiki.apache.org/solr/ExtendedDisMax André Kelkoo SAS Société par Actions Simplifiée Au capital de € 4.168.964,30 Siège social : 8, rue du Sentier 75002 Paris 425 093 069 RCS Paris Ce message et les pièces jointes sont confidentiels et établis à l'attention exclusive de leurs destinataires. Si vous n'êtes pas le destinataire de ce message, merci de le détruire et d'en avertir l'expéditeur.
Re: solre scores remains same for exact match and nearly exact match
The simple way to write the query: q=subject:session subject:management subject:in subject:php Would be: q=subject:(session management in php) Of course, edismax is usually a better way to go in general. -- Jack Krupansky -Original Message- From: Andre Bois-Crettez Sent: Thursday, April 04, 2013 4:52 AM To: solr-user@lucene.apache.org Subject: Re: solre scores remains same for exact match and nearly exact match On 04/03/2013 07:22 AM, amit wrote: Below is my query http://localhost:8983/solr/select/?q=subject:session management in phpfq=category:[*%20TO%20*]fl=category,score,subject You specify that you want session to appear in field subject, but the other tokens only match to the default search field. Which one did you specify in your schema ? It is probable you actually wanted to do : q=subject:session subject:management subject:in subject:php Or written in a better way, specify Default query Field in your url : q=session management in phpdf=subject Or even better, use eDisMax if you need to search across multiple fields at once withqf=filed1,filed2,field3 : http://wiki.apache.org/solr/ExtendedDisMax André Kelkoo SAS Société par Actions Simplifiée Au capital de € 4.168.964,30 Siège social : 8, rue du Sentier 75002 Paris 425 093 069 RCS Paris Ce message et les pièces jointes sont confidentiels et établis à l'attention exclusive de leurs destinataires. Si vous n'êtes pas le destinataire de ce message, merci de le détruire et d'en avertir l'expéditeur.
Re: solre scores remains same for exact match and nearly exact match
Thanks Jack and Andre I am trying to use edismax;but struck with the NoClassDefFoundError: org/apache/solr/response/QueryResponseWriter I am using solr 3.6 I have followed the steps here http://wiki.apache.org/solr/VelocityResponseWriter#Using_the_VelocityResponseWriter_in_Solr_Core Just the jars are copied rest was already there in solrconfig.xml -- View this message in context: http://lucene.472066.n3.nabble.com/solre-scores-remains-same-for-exact-match-and-nearly-exact-match-tp4053406p4053811.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: solre scores remains same for exact match and nearly exact match
On 3 April 2013 10:52, amit amit.mal...@gmail.com wrote: Below is my query http://localhost:8983/solr/select/?q=subject:session management in phpfq=category:[*%20TO%20*]fl=category,score,subject [...] Add debugQuery=on to your Solr URL, and you will get an explanation of the score. Your subject field is tokenised, so that there is no a priori reason that an exact match should score higher. Several strategies are available if you want that behaviour. Try searching Google, e.g., for solr exact match higher score. Regards, Gora
Re: solre scores remains same for exact match and nearly exact match
Thanks. I added a copy field and that fixed the issue. On Wed, Apr 3, 2013 at 12:29 PM, Gora Mohanty-3 [via Lucene] ml-node+s472066n4053412...@n3.nabble.com wrote: On 3 April 2013 10:52, amit [hidden email]http://user/SendEmail.jtp?type=nodenode=4053412i=0 wrote: Below is my query http://localhost:8983/solr/select/?q=subject:session management in phpfq=category:[*%20TO%20*]fl=category,score,subject [...] Add debugQuery=on to your Solr URL, and you will get an explanation of the score. Your subject field is tokenised, so that there is no a priori reason that an exact match should score higher. Several strategies are available if you want that behaviour. Try searching Google, e.g., for solr exact match higher score. Regards, Gora -- If you reply to this email, your message will be added to the discussion below: http://lucene.472066.n3.nabble.com/solre-scores-remains-same-for-exact-match-and-nearly-exact-match-tp4053406p4053412.html To unsubscribe from solre scores remains same for exact match and nearly exact match, click herehttp://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4053406code=YW1pdC5tYWxsaWtAZ21haWwuY29tfDQwNTM0MDZ8LTk5Njc5OTA3NA== . NAMLhttp://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://lucene.472066.n3.nabble.com/solre-scores-remains-same-for-exact-match-and-nearly-exact-match-tp4053406p4053478.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: solre scores remains same for exact match and nearly exact match
when I use the copy field destination as text it works fine. I get a boost for exact match. But if I use some other field the score is not boosted for exact match. field name=keywords type=text_general indexed=true stored=false multiValued=true/ copyField source=subject dest=keywords/ Not sure if I am in the right direction.. I am new to solr please bear with me I checked this link http://wiki.apache.org/solr/SolrRelevancyCookbook and trying to index same field multiple times to get exact match. -- View this message in context: http://lucene.472066.n3.nabble.com/solre-scores-remains-same-for-exact-match-and-nearly-exact-match-tp4053406p4053718.html Sent from the Solr - User mailing list archive at Nabble.com.
solre scores remains same for exact match and nearly exact match
Below is my query http://localhost:8983/solr/select/?q=subject:session management in phpfq=category:[*%20TO%20*]fl=category,score,subject The result is like below ?xml version=1.0 encoding=UTF-8? response lst name=responseHeader int name=status0/int int name=QTime983/int lst name=params str name=fqcategory:[* TO *]/str str name=qsubject:session management in php/str str name=flcategory,score,subject/str /lst /lst result name=response maxScore=0.8770298 start=0 numFound=2 doc float name=score0.8770298/float str name=categoryAnnapurnap/str str name=subjectsession management in asp.net/str /doc doc float name=score0.8770298/float str name=categoryAnnapurnap/str str name=subjectsession management in PHP/str /doc /result /response The question is how come both have the same score when 1 is exact match and the other isn't. This is the schema field name=subject type=text_en_splitting indexed=true stored=true/ field name=category type=text_general indexed=true stored=true/ -- View this message in context: http://lucene.472066.n3.nabble.com/solre-scores-remains-same-for-exact-match-and-nearly-exact-match-tp4053406.html Sent from the Solr - User mailing list archive at Nabble.com.