title: sort elasticsearch result so that the result with keyword in the beginning appear first
body: <p>I am searching for the word "stud" , and i am expecting the result in this order</p>
  
  <p>"occupation": "Student (Betriebswirtschaft)"</p>
  
  <p>"occupation": "Student (Humanmedizin)"</p>
  
  <p>"occupation": "Student (Bauwesen)"</p>
  
  <p>"occupation": "Student (Chemie)"</p>
  
  <p>"occupation": "Student (Architektur)"</p>
  
  <p>"occupation": "Oberstudienrat/Oberstudienrätin"</p>
  
  <p>"occupation": "Nagelstudioinhaber"</p>
  
  <p><strong>But I get the result in this sequence</strong></p>
  
  <p>"occupation": "Student (Betriebswirtschaft)"</p>
  
  <p>"occupation": "Student (Humanmedizin)"</p>
  
  <p>"occupation": "Oberstudienrat/Oberstudienrätin"</p>
  
  <p>"occupation": "Student (Bauwesen)"</p>
  
  <p>"occupation": "Student (Chemie)"</p>
  
  <p>"occupation": "Nagelstudioinhaber"</p>
  
  <p>"occupation": "Student (Architektur)"</p>
  
  <p>like these words "Oberstudienrat/Oberstudienrätin" ,  "Nagelstudioinhaber" should be at the end , Because i first want to see the results which have "stud" in the begining and then the words which have "stud" in the middle </p>
  
  <pre><code>{  
    "query":{  
    "bool":{  
       "must":[  
          {  
             "query_string":{  
                "query":"*Stud*",
                "fields":[  
                   "occupation"
                ]
             }
          }
       ]
    }
  },
  "rescore":{  
    "window_size":500,
    "query":{  
       "score_mode":"multiply",
       "rescore_query":{  
          "bool":{  
             "should":[  
  
                {  
                   "match":{  
                      "occupation":{  
                         "query":"Stud*",
                         "boost":3
                      }
                   }
                }
             ]
          }
       },
       "query_weight":2.7,
       "rescore_query_weight":3.2
    }
  </code></pre>
  
  <p>}
  }</p>