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 Jason Brown <Ja...@sjp.co.uk> on 2010/11/29 17:28:20 UTC

Boost on newer documents

Hi,

I use the dismax query to search across several fields.

I find I have a lot of documents with the same document name (one of the fields that the dismax queries) so I wanted to adjust the relevance so that titles with a newer published date have a higher relevance than documents with the same title but are older. Does anyone know how I can achieve this?

Thank You

Jason.

If you wish to view the St. James's Place email disclaimer, please use the link below

http://www.sjp.co.uk/portal/internet/SJPemaildisclaimer

RE: Boost on newer documents

Posted by Jason Brown <Ja...@sjp.co.uk>.
Great - Thank You.


-----Original Message-----
From: Mat Brown [mailto:mat@patch.com]
Sent: Mon 29/11/2010 16:33
To: solr-user@lucene.apache.org
Subject: Re: Boost on newer documents
 
Hi Jason,

You can use boost functions in the dismax handler to do this:

http://wiki.apache.org/solr/DisMaxQParserPlugin#bf_.28Boost_Functions.29

Mat

On Mon, Nov 29, 2010 at 11:28, Jason Brown <Ja...@sjp.co.uk> wrote:
>
> Hi,
>
> I use the dismax query to search across several fields.
>
> I find I have a lot of documents with the same document name (one of the fields that the dismax queries) so I wanted to adjust the relevance so that titles with a newer published date have a higher relevance than documents with the same title but are older. Does anyone know how I can achieve this?
>
> Thank You
>
> Jason.
>
> If you wish to view the St. James's Place email disclaimer, please use the link below
>
> http://www.sjp.co.uk/portal/internet/SJPemaildisclaimer
>


If you wish to view the St. James's Place email disclaimer, please use the link below

http://www.sjp.co.uk/portal/internet/SJPemaildisclaimer

Re: Boost on newer documents

Posted by Mat Brown <ma...@patch.com>.
Hi Jason,

You can use boost functions in the dismax handler to do this:

http://wiki.apache.org/solr/DisMaxQParserPlugin#bf_.28Boost_Functions.29

Mat

On Mon, Nov 29, 2010 at 11:28, Jason Brown <Ja...@sjp.co.uk> wrote:
>
> Hi,
>
> I use the dismax query to search across several fields.
>
> I find I have a lot of documents with the same document name (one of the fields that the dismax queries) so I wanted to adjust the relevance so that titles with a newer published date have a higher relevance than documents with the same title but are older. Does anyone know how I can achieve this?
>
> Thank You
>
> Jason.
>
> If you wish to view the St. James's Place email disclaimer, please use the link below
>
> http://www.sjp.co.uk/portal/internet/SJPemaildisclaimer
>

Re: Boost on newer documents

Posted by Stefan Matheis <ma...@googlemail.com>.
Hi Jason,

maybe, just use another field w/ creation-/modification-date and boost on
this field?

Regards
Stefan

On Mon, Nov 29, 2010 at 5:28 PM, Jason Brown <Ja...@sjp.co.uk> wrote:

>
> Hi,
>
> I use the dismax query to search across several fields.
>
> I find I have a lot of documents with the same document name (one of the
> fields that the dismax queries) so I wanted to adjust the relevance so that
> titles with a newer published date have a higher relevance than documents
> with the same title but are older. Does anyone know how I can achieve this?
>
> Thank You
>
> Jason.
>
> If you wish to view the St. James's Place email disclaimer, please use the
> link below
>
> http://www.sjp.co.uk/portal/internet/SJPemaildisclaimer
>

Re: Boost on newer documents

Posted by Savvas-Andreas Moysidis <sa...@googlemail.com>.
ahhh I see..good point..yes, for a high number of unique scores the
secondary sort won't have any effect..

On 30 November 2010 09:32, Jason Brown <Ja...@sjp.co.uk> wrote:

> Hi - you do understand may case - we tried what you suggested but as the
> relevancy is very precise we couldn't get it it to do a dual-sort.
>
> I like the idea of using one of the dismax parameters (bf) to in-effect
> increase the boost on a newer document.
>
> Thanks for all replies, most useful.
>
>
> -----Original Message-----
> From: Savvas-Andreas Moysidis [mailto:
> savvas.andreas.moysidis@googlemail.com]
> Sent: Tue 30/11/2010 09:26
> To: solr-user@lucene.apache.org
> Subject: Re: Boost on newer documents
>
> hi,
>
> I might not understand your case right but can you not add an extra
> publishedDate field and then specify a secondary (after relevance) sort by
> that?
>
> On 30 November 2010 08:05, <ja...@nokia.com> wrote:
>
> > You could also put a short representation of the data (I suggest days
> since
> > 01.01.2010) as payload and calculate boost with payload function of the
> > similarity.
> >
> > >-----Original Message-----
> > >From: ext Jason Brown [mailto:Jason.Brown@sjp.co.uk]
> > >Sent: Montag, 29. November 2010 17:28
> > >To: solr-user@lucene.apache.org
> > >Subject: Boost on newer documents
> > >
> > >
> > >Hi,
> > >
> > >I use the dismax query to search across several fields.
> > >
> > >I find I have a lot of documents with the same document name (one of the
> > fields that the dismax queries) so I wanted to adjust the
> > >relevance so that titles with a newer published date have a higher
> > relevance than documents with the same title but are older. Does
> > >anyone know how I can achieve this?
> > >
> > >Thank You
> > >
> > >Jason.
> > >
> > >If you wish to view the St. James's Place email disclaimer, please use
> the
> > link below
> > >
> > >http://www.sjp.co.uk/portal/internet/SJPemaildisclaimer
> >
>
>
> If you wish to view the St. James's Place email disclaimer, please use the
> link below
>
> http://www.sjp.co.uk/portal/internet/SJPemaildisclaimer
>

RE: Boost on newer documents

Posted by Jason Brown <Ja...@sjp.co.uk>.
Hi - you do understand may case - we tried what you suggested but as the relevancy is very precise we couldn't get it it to do a dual-sort.

I like the idea of using one of the dismax parameters (bf) to in-effect increase the boost on a newer document. 

Thanks for all replies, most useful.


-----Original Message-----
From: Savvas-Andreas Moysidis [mailto:savvas.andreas.moysidis@googlemail.com]
Sent: Tue 30/11/2010 09:26
To: solr-user@lucene.apache.org
Subject: Re: Boost on newer documents
 
hi,

I might not understand your case right but can you not add an extra
publishedDate field and then specify a secondary (after relevance) sort by
that?

On 30 November 2010 08:05, <ja...@nokia.com> wrote:

> You could also put a short representation of the data (I suggest days since
> 01.01.2010) as payload and calculate boost with payload function of the
> similarity.
>
> >-----Original Message-----
> >From: ext Jason Brown [mailto:Jason.Brown@sjp.co.uk]
> >Sent: Montag, 29. November 2010 17:28
> >To: solr-user@lucene.apache.org
> >Subject: Boost on newer documents
> >
> >
> >Hi,
> >
> >I use the dismax query to search across several fields.
> >
> >I find I have a lot of documents with the same document name (one of the
> fields that the dismax queries) so I wanted to adjust the
> >relevance so that titles with a newer published date have a higher
> relevance than documents with the same title but are older. Does
> >anyone know how I can achieve this?
> >
> >Thank You
> >
> >Jason.
> >
> >If you wish to view the St. James's Place email disclaimer, please use the
> link below
> >
> >http://www.sjp.co.uk/portal/internet/SJPemaildisclaimer
>


If you wish to view the St. James's Place email disclaimer, please use the link below

http://www.sjp.co.uk/portal/internet/SJPemaildisclaimer

Re: Boost on newer documents

Posted by Savvas-Andreas Moysidis <sa...@googlemail.com>.
hi,

I might not understand your case right but can you not add an extra
publishedDate field and then specify a secondary (after relevance) sort by
that?

On 30 November 2010 08:05, <ja...@nokia.com> wrote:

> You could also put a short representation of the data (I suggest days since
> 01.01.2010) as payload and calculate boost with payload function of the
> similarity.
>
> >-----Original Message-----
> >From: ext Jason Brown [mailto:Jason.Brown@sjp.co.uk]
> >Sent: Montag, 29. November 2010 17:28
> >To: solr-user@lucene.apache.org
> >Subject: Boost on newer documents
> >
> >
> >Hi,
> >
> >I use the dismax query to search across several fields.
> >
> >I find I have a lot of documents with the same document name (one of the
> fields that the dismax queries) so I wanted to adjust the
> >relevance so that titles with a newer published date have a higher
> relevance than documents with the same title but are older. Does
> >anyone know how I can achieve this?
> >
> >Thank You
> >
> >Jason.
> >
> >If you wish to view the St. James's Place email disclaimer, please use the
> link below
> >
> >http://www.sjp.co.uk/portal/internet/SJPemaildisclaimer
>

RE: Boost on newer documents

Posted by ja...@nokia.com.
You could also put a short representation of the data (I suggest days since 01.01.2010) as payload and calculate boost with payload function of the similarity.

>-----Original Message-----
>From: ext Jason Brown [mailto:Jason.Brown@sjp.co.uk]
>Sent: Montag, 29. November 2010 17:28
>To: solr-user@lucene.apache.org
>Subject: Boost on newer documents
>
>
>Hi,
>
>I use the dismax query to search across several fields.
>
>I find I have a lot of documents with the same document name (one of the fields that the dismax queries) so I wanted to adjust the
>relevance so that titles with a newer published date have a higher relevance than documents with the same title but are older. Does
>anyone know how I can achieve this?
>
>Thank You
>
>Jason.
>
>If you wish to view the St. James's Place email disclaimer, please use the link below
>
>http://www.sjp.co.uk/portal/internet/SJPemaildisclaimer