You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Robert Yu <RO...@morningstar.com> on 2011/12/26 04:29:27 UTC
sort issue in Solr
I want Solr return results by relevancy, but it seems it does not make
sense. For example, partial match does not return before exact match.
Even I enabled term length in schema definition.
Is there someone can provide suggestions?
For example, I want it return as the following order for keyword "BAC":
BAC // exact match before partial match below
BACC
BACC BAC KK // one exact match plus partial match return before one
exact match/partial match
BAC BC JJ
BACC // match with few words returns before match
with more words
BACC KK
BACC JJ MM
Thanks,
Robert
RE: sort issue in Solr
Posted by Robert Yu <RO...@morningstar.com>.
Thanks Gora. Inspired by the link, I've solved case 1 by putting it as a
exact match OR prefix match, such as "BAC" OR "BAC*".
But I can not find solution for case 2 and case 3 below.
Is there anyone can provide suggestions?
Thanks,
-----Original Message-----
From: Gora Mohanty [mailto:gora@mimirtech.com]
Sent: Monday, December 26, 2011 12:33 PM
To: solr-user@lucene.apache.org
Subject: Re: sort issue in Solr
On Mon, Dec 26, 2011 at 8:59 AM, Robert Yu <RO...@morningstar.com>
wrote:
> I want Solr return results by relevancy, but it seems it does not make
> sense. For example, partial match does not return before exact match.
> Even I enabled term length in schema definition.
[...]
There are various factors that can affect Solr relevance.
* You should try your query with debugQuery=1 added,
which will show you how the score of each document
is being calculated.
* Please also take a look at
http://wiki.apache.org/solr/SolrRelevancyCookbook
Regards,
Gora
Re: sort issue in Solr
Posted by Gora Mohanty <go...@mimirtech.com>.
On Mon, Dec 26, 2011 at 8:59 AM, Robert Yu <RO...@morningstar.com> wrote:
> I want Solr return results by relevancy, but it seems it does not make
> sense. For example, partial match does not return before exact match.
> Even I enabled term length in schema definition.
[...]
There are various factors that can affect Solr relevance.
* You should try your query with debugQuery=1 added,
which will show you how the score of each document
is being calculated.
* Please also take a look at
http://wiki.apache.org/solr/SolrRelevancyCookbook
Regards,
Gora