If you get the PACKT Solr 1.4 book, there are extensive examples of this
very thing.....

It's *well* worth the time it'll save you...

Erick

On Tue, Mar 2, 2010 at 4:11 PM, Ahmet Arslan <iori...@yahoo.com> wrote:

>
> >     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.
>
> [1]http://wiki.apache.org/solr/DisMaxRequestHandler
>
> At index time you can give different boost values to different fields. [2]
> e.g. <field name="Artist" boost="10.0">
>
> [2]
> http://wiki.apache.org/solr/UpdateXmlMessages#Optional_attributes_for_.22field.22
>
>
>
>

Reply via email to