Newbie quesiton re: document size & score

Hey all, I'm pretty new to ES still and have a scoring question:

Is there a way to disable/counteract Lucene's preference to score shorter
documents higher?

For example, if I have:

  • document A and B in an index
  • I do a match query for term X
  • doc A matches 1 time, and doc b matches 2 times
  • however, in the ES results, A scores higher because it is slightly
    shorter than B (despite B having more matches).

I'm curious if there's a way to ignore document length so a document with
more matches scores higher inevitably?

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

there are multiple ways to do this, the simplest is to set "omit_norm" :
true in the mapping which will omit the normalization info for that field.
see: http://www.elasticsearch.org/guide/reference/mapping/core-types/

simon

On Tuesday, April 23, 2013 11:10:10 PM UTC+2, Tieg Zaharia wrote:

Hey all, I'm pretty new to ES still and have a scoring question:

Is there a way to disable/counteract Lucene's preference to score shorter
documents higher?

For example, if I have:

  • document A and B in an index
  • I do a match query for term X
  • doc A matches 1 time, and doc b matches 2 times
  • however, in the ES results, A scores higher because it is slightly
    shorter than B (despite B having more matches).

I'm curious if there's a way to ignore document length so a document with
more matches scores higher inevitably?

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

omit_norms is perfect! Thanks simonw.

On Tue, Apr 23, 2013 at 5:32 PM, simonw
simon.willnauer@elasticsearch.comwrote:

there are multiple ways to do this, the simplest is to set "omit_norm" :
true in the mapping which will omit the normalization info for that field.
see: http://www.elasticsearch.org/guide/reference/mapping/core-types/

simon

On Tuesday, April 23, 2013 11:10:10 PM UTC+2, Tieg Zaharia wrote:

Hey all, I'm pretty new to ES still and have a scoring question:

Is there a way to disable/counteract Lucene's preference to score shorter
documents higher?

For example, if I have:

  • document A and B in an index
  • I do a match query for term X
  • doc A matches 1 time, and doc b matches 2 times
  • however, in the ES results, A scores higher because it is slightly
    shorter than B (despite B having more matches).

I'm curious if there's a way to ignore document length so a document with
more matches scores higher inevitably?

Thanks in advance.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/zHbRacGGYS8/unsubscribe?hl=en-US
.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.