lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claudio Ranieri <claudio.rani...@estadao.com>
Subject RES: Boosting in query level the relevance based in content of any fields
Date Mon, 01 Oct 2012 12:20:03 GMT
Hi Toke,

Is there a way to omit the cities with boosting 1?
The number of cities is big, but the number of "important" cities is small.

-----Mensagem original-----
De: Toke Eskildsen [mailto:te@statsbiblioteket.dk] 
Enviada em: segunda-feira, 1 de outubro de 2012 09:13
Para: solr-user@lucene.apache.org
Assunto: Re: Boosting in query level the relevance based in content of any fields

On Fri, 2012-09-28 at 14:43 +0200, Claudio Ranieri wrote:
> name | city
> Jose | Campinas
> Jose | São Paulo
> Jose | Rio de Janeiro
> Jose | Rio Branco
> Jose | Ourinhos
> 
> In search by "Jose", I wish return on top the documents (Jose | São 
> Paulo and Jose | Rio de Janeiro).

If all documents has a city and the number of cities is fairly low, you could add a boosting
element to your query:
(Jose) and (city:Campinas^1 OR city:São\ Paulo^2 OR city:Cio\ de\
Janeiro^2 OR city:Rio\ Branco^1 OR city:Ourinhos)

Mime
View raw message