Hi Binh,

Thanks. Excellent info that you shared. In addition i would like to know
how actually the scores calculated as the two queries below yield different
results :


1)

{
  "from" : 0,
  "size" : 100,
  "query" : {
    "filtered" : {
      "query" : {
         "multi_match": {
               "query": "love",
               "fields": [ "DISPLAY_NAME^6", "LONG_DESCRIPTION",
"SHORT_DESCRIPTION", "PERFORMER" ]
    }
      },
      "filter" : {
        "query" : {
          "bool" : {
          "must" : {
            "term" : {
              "CHANNEL_ID" : "1"
            }
          }
        }
        }
      }
    }
  }
}


*Result *:
              "_score": *1.372128*,
                "_source": {
                    "DISPLAY_NAME": "Listen To My Song",
                    "PRICE": 5,


2)

{
  "from" : 0,
  "size" : 100,
  "query" : {
    "filtered" : {
      "query" : {
        "bool" : {
            "should" : [ {
              "wildcard" : {
                "DISPLAY_NAME" : {"value": "love", "boost": 6}
              }
            }, {
              "wildcard" : {
                "LONG_DESCRIPTION" : "love"
              }
            }, {
              "wildcard" : {
                "SHORT_DESCRIPTION" : "love"
              }
            }, {
              "wildcard" : {
                "PERFORMER" : "love"
              }
            } ]
          }
      },
      "filter" : {
        "query" : {
          "bool" : {
          "must" : {
            "term" : {
              "CHANNEL_ID" : "1"
            }
          }
        }
        }
      }
    }
  }
}


*Result *:

                "_score":* 0.040032037*,
                "_source": {
                    "DISPLAY_NAME": "Listen To My Song",




















On Tue, Apr 1, 2014 at 5:59 AM, Binh Ly <[email protected]> wrote:

> ^ is a boost - so it makes the match score higher. Aboout your other
> question, that's default behavior for Lucene scoring - i.e., fields that
> are shorter will have higher relevancy against your query terms. You can
> disable norms if you don't want this behavior:
>
>
> http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-core-types.html#norms
>
> --
> 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/RXuuSlkDSyA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/099604d4-b5f2-492b-b8cd-185d66293921%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/099604d4-b5f2-492b-b8cd-185d66293921%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards,

Chee Hoo

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAGS0%2Bg8L_a5TNMyZa7Q9k%3D%2BR012W_tXckkp%2B_MiRVcacyktEmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to