title: can we assign 1 weight together for 2 conditions in elasticsearch
body: <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Weight 100</th>
  <th>Weight 10</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>listen&gt;10k</td>
  <td>listen&gt;10k</td>
  </tr>
  <tr>
  <td>publish date&gt;01/01/21</td>
  <td>publish date&gt;01/01/20</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I tried adding weights separately for publish date but face a challenge when there is same amount of listens. Any help will be appreciated.</p>
  <p>Below the query I have tried so far:</p>
  <pre><code>{
     &quot;query&quot; : {
       &quot;boosting&quot; : {
         &quot;positive&quot; : {
           &quot;function_score&quot; : {
             &quot;query&quot; : {
               &quot;dis_max&quot; : {
                 &quot;queries&quot; : [
                     { &quot;match&quot; : 
                       { &quot;category.name&quot; :
                         {
                           &quot;query&quot; : &quot;TV &amp; Film&quot;,
                           &quot;boost&quot; : 1
                         }
                       }
                     }
                   
                    ]
                  }
                },
                &quot;functions&quot; : [{&quot;filter&quot;: { 
           &quot;range&quot; : { &quot;publishTime&quot;: { &quot;gte&quot; : &quot;now-7d&quot;, &quot;lte&quot; : &quot;now&quot; } }} ,
           &quot;weight&quot;: 1000
       },
       {&quot;filter&quot;: { 
          &quot;range&quot; : { &quot;publishTime&quot;: { &quot;gte&quot; : &quot;now-15d&quot;, &quot;lt&quot; : &quot;now-7d&quot; } }} ,
          &quot;weight&quot;: 100
        },
       {&quot;filter&quot;: { 
          &quot;range&quot; : { &quot;publishTime&quot;: { &quot;gte&quot; : &quot;now-30d&quot;, &quot;lt&quot; : &quot;now-15d&quot; } }} ,
          &quot;weight&quot;: 10
        },
       {&quot;filter&quot;: { 
          &quot;range&quot; : { &quot;publishTime&quot;: {&quot;lt&quot; : &quot;now-30d&quot; } }} ,
          &quot;weight&quot;: 1
        },
       {&quot;filter&quot;: { 
          &quot;range&quot; : { &quot;listen&quot;: { &quot;lt&quot; : &quot;10000&quot;, &quot;gte&quot; : &quot;1000&quot; } }} ,
          &quot;weight&quot;: 1000
        },{&quot;filter&quot;: { 
          &quot;range&quot; : { &quot;listen&quot;: { &quot;lt&quot; : &quot;100000&quot;, &quot;gte&quot; : &quot;10000&quot;} }} ,
          &quot;weight&quot;: 100
        },{&quot;filter&quot;: { 
          &quot;range&quot; : { &quot;listen&quot;: { &quot;lt&quot; : &quot;1000000&quot;, &quot;gte&quot; : &quot;100000&quot; } }} ,
          &quot;weight&quot;: 10
        },{&quot;filter&quot;: { 
          &quot;range&quot; : { &quot;listen&quot;: { &quot;lt&quot; : &quot;10000000&quot;, &quot;gte&quot; : &quot;1000000&quot; } }} ,
          &quot;weight&quot;: 1
        }
                 
                ]
              }
            },
            &quot;negative&quot; : {
              &quot;match&quot; : { &quot;studio&quot; : &quot;false&quot; }
             },
             &quot;negative_boost&quot; : 0.1
         }
      }
   }
  </code></pre>
  <p>Expected search link has been attached. Also, can you please help to vary the score from each other
  [1]: <a href="https://i.stack.imgur.com/UkW5N.png" rel="nofollow noreferrer">https://i.stack.imgur.com/UkW5N.png</a></p>
  <p>Thanks</p>