(ElasticSearch) REDUCING SCORING IMPACT WITH QUERY RESCORING

In some cases, however, scoring can be more resource-intensive:
  • Scoring with a script runs a script to calculate the score for each document in the index
  • Doing a phrase query searches for words within a certain distance from each other, with a large slop

To address this, elasticsearch use rescoring

POST get-together/_search?pretty
{
  "query" : {
    "match" : {
      "title" : "elasticsearch"
    }
  },
  "rescore" : {
    "window_size" : 20,
    "query" : {
      "rescore_query" : {
        "match" : {
          "title" : {
            "type" : "phrase",
            "query" : "elasticsearch hadoop",
            "slop" : 5
          }
        }
      },
      "query_weight" : 0.8,
      "rescore_query_weight" : 1.3
    }
  }
}


"window_size" means Number of results to be rescore
this situations is only 20 

댓글

이 블로그의 인기 게시물

(18장) WebSocekt과 STOMP를 사용하여 메시징하기

(네트워크)폴링방식 vs 롱 폴링방식

(ElasticSearch) 결과에서 순서 정렬