lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "S├ębastien Rainville" <>
Subject scoring individual values in a multivalued field
Date Fri, 29 Aug 2008 02:44:57 GMT

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":

<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>

<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>

<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>

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,

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