title: Difference between Weight and boost in Elasticsearch
body: <p>I read about boosting in Elasticsearch. We can apply boosting at index or query time. Index time boosting is sort of static boosting and not suggested. Query time boosting is dynamic in nature. Query time boosting is good and preferred approach.</p>
  
  <p>We can also add boosting to the fields. For example we are searching a term in multiple fields. We can boost a field to change the score of the document.</p>
  
  <pre><code>{
     "match":{"title":{"query":"test string","boost":10}}
  },
  </code></pre>
  
  <p>I read about weight. </p>
  
  <pre><code>{
       "filter": { "match": { "test": "cat" } },
       "weight": 42
  }
  </code></pre>
  
  <p>My understanding is weight applied on the fields in order to change the relevancy or score.
  Boost is applied to queries in order to change the relevancy or score.</p>
  
  <p>But I am not sure about the difference in weight and boost.</p>
  
  <p>Could someone correct me in understanding the difference between weight and boost with some example?</p>