lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jaco <jdevr...@gmail.com>
Subject Re: scoring individual values in a multivalued field
Date Fri, 05 Sep 2008 06:18:20 GMT
Hi,

I ran into the same problem some time ago, couldn't find any relation to the
boost values on the multivalued field and the search results. Does anybody
have an idea how to handle this?

Thanks,

Jaco.

2008/8/29 S├ębastien Rainville <sebastienrainville@gmail.com>

> Hi,
>
> I have a multivalued field that I would want to score individually for each
> value. Is there an easy way to do that?
>
> Here's a concrete example of what I'm trying to achieve:
>
> Let's say that I have 3 documents with a field "name_t" and a multivalued
> field "caracteristic_t_mv":
>
> <doc>
> <field name="name_t" boost="1.0">Dog</field>
> <field name="caracteristic_t_mv" boost="0.45">Cool</field>
> <field name="caracteristic_t_mv" boost="0.2">Big</field>
> <field name="caracteristic_t_mv" boost="0.89">Dirty</field>
> </doc>
>
> <doc>
> <field name="name_t" boost="1.0">Cat</field>
> <field name="caracteristic_t_mv" boost="0.76">Small</field>
> <field name="caracteristic_t_mv" boost="0.32">Dirty</field>
> </doc>
>
> <doc>
> <field name="name_t" boost="1.0">Fish</field>
> <field name="caracteristic_t_mv" boost="0.92">Smells</field>
> <field name="caracteristic_t_mv" boost="0.55">Dirty</field>
> </doc>
>
> If I query only the field caracteristic_t_mv for the value "Dirty" I would
> like the documents to be sorted accordingly => get 1-3-2.
>
> It's possible to set the scoring of a field when indexing but there are 2
> problems with that:
> 1) the value of the field boost is actually the multiplication of the value
> for the different boost values of the fields with the same name;
> 2) the value of normField is persisted as a byte in the index and the
> precision loss hurts.
>
> Thanks in advance,
> Sebastien
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message