What does setting dis_max exactly do in a query_string query?

I'm running a query as follows:

  • query: {
    query_string: {
    - query: "china"
    - default_operator: "AND"
    - use_dis_max: true
    - -
    fields: [
    - "headline"
    - "byline"
    - "body"
    ]
    }
    }

I've been toggling use_dis_max on and off but can't seem to decipher what
exactly is going on. From the Elasticsearch documentation, dis_max is
mentioned as "Since several queries are generated, combining them can be
automatically done either using a dis_maxquery or a simple bool query. "
What exactly is meant by combining them? I understand individual queries
are run for my query term ('china') to be run against each field specified
and documents with that field matching my term are returned with a score,
but what happens afterward? From dis_max query documentation, I assume the
highest score for a document is returned, but how about when I set
use_dis_max to false then? At least from what I'm seeing with my data set,
setting dis_max to false or true produces identical results.

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

Here is a great blog post about DisMax:
http://searchhub.org/2010/05/23/whats-a-dismax/

--
Ivan

On Thu, May 9, 2013 at 8:12 AM, Marlo Epres mepres@gmail.com wrote:

I'm running a query as follows:

  • query: {
    query_string: {
    - query: "china"
    - default_operator: "AND"
    - use_dis_max: true
    - -
    fields: [
    - "headline"
    - "byline"
    - "body"
    ]
    }
    }

I've been toggling use_dis_max on and off but can't seem to decipher what
exactly is going on. From the Elasticsearch documentation, dis_max is
mentioned as "Since several queries are generated, combining them can be
automatically done either using a dis_maxquery or a simple bool query. "
What exactly is meant by combining them? I understand individual queries
are run for my query term ('china') to be run against each field specified
and documents with that field matching my term are returned with a score,
but what happens afterward? From dis_max query documentation, I assume the
highest score for a document is returned, but how about when I set
use_dis_max to false then? At least from what I'm seeing with my data set,
setting dis_max to false or true produces identical results.

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

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