lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <>
Subject Re: Different weights to different fields
Date Tue, 02 Mar 2010 21:11:41 GMT

>     I'm new to Solr and just getting it set up
> and testing it out.  I'd like to know if there's a way
> to give a different weight to different data fields.
> For an example, I'm going to be storing song
> information.  I have the fields: Artist, Title,
> Description, and Tags.  I'd like occurrences of the
> search term in Artist and Title to count more than the ones
> found in Description and Tags.  For instance, a search
> for Bruce Springsteen against all the fields should return
> the ones where artist=Bruce Springsteen higher than ones
> that just have that within the description.  Is this
> possible either in the indexing or with a query option?

You can do it in either query time or index time. In query time you can assign different boost
values with carat operator. 
e.g. Artist:(Bruce Springsteen)^10 Title:(Bruce Springsteen)^5

Also dismax[1] request handler might useful to you.


At index time you can give different boost values to different fields. [2]
e.g. <field name="Artist" boost="10.0">



View raw message