0

I am building an e-commerce site. When searching for products with a string, I want to search the name field and the description field, and I want the name field to be more important than description.

How can I do this and what terminology should I look at?

cf-
  • 8,598
  • 9
  • 36
  • 58
user3444626
  • 115
  • 2
  • 9
  • [boost](http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/_boosting_query_clauses.html) – femtoRgon May 12 '14 at 09:10
  • Possible duplicate of [this answer](http://stackoverflow.com/questions/12427449/elasticsearch-boosting-relevance-based-on-field-value) – AVK May 13 '14 at 05:15

1 Answers1

1

This is an example concerning the query_string section in the query :

 "query_string" : {
    "fields" : ["description", "name^5"],
    "query" : "this AND that OR thus",
 }

You can read more about Query String here

eliasah
  • 39,588
  • 11
  • 124
  • 154