You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Jaco <jd...@gmail.com> on 2008/09/05 08:18:20 UTC
Re: scoring individual values in a multivalued field
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 <se...@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
>
Re: scoring individual values in a multivalued field
Posted by abhishek007 <ab...@rapleaf.com>.
: unfortunately not possible. lengthNorm is part of fieldNorm and for each
: doc there is one fieldNorm per field name...
Thanks for the reply Chris, this solves part of my problem. I have explained
my problem in much more detail in a separate thread (as it would have been
out of context here).
http://www.nabble.com/Querying-multivalued-field---can-scoring-formula-consider-only-matched-values--tt19865873.html#a19865873
--
View this message in context: http://www.nabble.com/scoring-individual-values-in-a-multivalued-field-tp19212800p19928740.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: scoring individual values in a multivalued field
Posted by Chris Hostetter <ho...@fucit.org>.
: and my query string is "Hennessy", the length normalization factor considers
: all 4 tokens as in "John", "Hennessy", "David", "Patterson". This is
: similar to the score if my field was like:
:
: <field name="author">John Hennessy David Patterson</field>
:
: I want the score to consider only that field value with any matches (here,
: "John Hennessy").
: Thanks in advance
unfortunately not possible. lengthNorm is part of fieldNorm and for each
doc there is one fieldNorm per field name...
: > as the OP mentioned, the index time boost values for a field are per field
: > *name* not per value ... they all get folded in together into hte
: > fieldNorm for that field name in that document.
-Hoss
Re: scoring individual values in a multivalued field
Posted by abhishek007 <ab...@rapleaf.com>.
I hope I am in the right thread for my doubt, which is somewhat related to
the ongoing discussion.
I have seen that when we search in a multivaled field, the length
normalization factor considers all values of the field, rather than
considering only the matched field value.
For example, if my document is like:
<document>
<field name="author">John Hennessy</field>
<field name="author">David Patterson</field>
</document>
and my query string is "Hennessy", the length normalization factor considers
all 4 tokens as in "John", "Hennessy", "David", "Patterson". This is
similar to the score if my field was like:
<field name="author">John Hennessy David Patterson</field>
I want the score to consider only that field value with any matches (here,
"John Hennessy").
Thanks in advance
-Abhishek
hossman wrote:
>
>
> : 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
>
> as the OP mentioned, the index time boost values for a field are per field
> *name* not per value ... they all get folded in together into hte
> fieldNorm for that field name in that document.
>
>
>
> -Hoss
>
>
>
--
View this message in context: http://www.nabble.com/scoring-individual-values-in-a-multivalued-field-tp19212800p19852427.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: scoring individual values in a multivalued field
Posted by Chris Hostetter <ho...@fucit.org>.
: 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
as the OP mentioned, the index time boost values for a field are per field
*name* not per value ... they all get folded in together into hte
fieldNorm for that field name in that document.
-Hoss