lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Feak, Todd" <Todd.F...@smss.sony.com>
Subject RE: Custom sort (score + custom value)
Date Mon, 03 Nov 2008 17:43:34 GMT
Have you looked into the "bf" and "bq" arguments on the
DisMaxRequestHandler?

http://wiki.apache.org/solr/DisMaxRequestHandler?highlight=(dismax)#head
-6862070cf279d9a09bdab971309135c7aea22fb3

-Todd

-----Original Message-----
From: George [mailto:emagpada@gmail.com] 
Sent: Monday, November 03, 2008 9:38 AM
To: solr-user@lucene.apache.org
Subject: Re: Custom sort (score + custom value)

Ok Yonik, thank you.

I've tried to execute the following query: "{!boost b=log(myrank)
defType=dismax}q" and it works great.

Do you know if I can do the same (combine a DisjunctionMaxQuery with a
BoostedQuery) in solrconfig.xml?

George

On Sun, Nov 2, 2008 at 3:01 PM, Yonik Seeley <yonik@apache.org> wrote:

> On Sun, Nov 2, 2008 at 5:09 AM, George <emagpada@gmail.com> wrote:
> > I want to implement a custom sort in Solr based on a combination of
> > relevance (Solr gives me it yet => score) and a custom value I've
> calculated
> > previously for each document. I see two options:
> >
> > 1. Use a function query (I'm using a DisMaxRequestHandler).
> > 2. Create a component that set SortSpec with a sort that has a
custom
> > ComparatorSource (similar to QueryElevationComponent).
> >
> > The first option has the problem: While the relevance value changes
for
> > every query, my custom value is constant for each doc.
>
> Yes, that can be an issue when adding unrelated scores.
> Multiplying them might give you better results:
>
>
http://lucene.apache.org/solr/api/org/apache/solr/search/BoostQParserPlu
gin.html
>
> -Yonik
>

Mime
View raw message