dis_max 5

2-3-03. Best Fields

Imagine that we have a website that allows users to search blog posts, such as these two documents:사용자들이 블로그 포스트를 검색할 수 있는 website를 가지고 있다고 가정해 보자. 다음과 같이 2개의 document가 있다.PUT /my_index/my_type/1 { "title": "Quick brown rabbits", "body": "Brown rabbits are commonly seen." } PUT /my_index/my_type/2 { "title": "Keeping pets healthy", "body": "My quick brown fox eats rabbits on a regular basis." }C..

2-3-04. Tuning Best Fields Queries

What would happen if the user had searched instead for "quick pets"? Both documents contain the word quick, but only document 2 contains the word pets. Neither document contains both wordsin the same field.만약 사용자가 "quick pets" 을 검색한다면 어떻게 될까? 두 document 모두 quick 이라는 단어를 포함하고 있고, document 2만 pets 를 포함하고 있다. 동일한 field 에 두 단어 모두 를 포함하고 있는 document는 없다.A simple dis_max query like the following would..

2-3-05. multi_match Query

The multi_match query provides a convenient shorthand way of running the same query against multiple fields.multi_match query는, 여러 field에 동일한 query를 실행하는, 아주 편리한 query이다.There are several types of multi_match query, three of which just happen to coincide with the three scenarios that we listed in Know Your Data: best_fields, most_fields, and cross_fields.multi_match query는 여러 가지 형태가 있다. Know You..

2-3-06. Most Fields

Full-text search is a battle between recall—returning all the documents that are relevant—and precision—not returning irrelevant documents. The goal is to present the user with the most relevant documents on the first page of results.full-text 검색은 recall(적합한 document 모두를 반환하는)과 정확성(precision)(부적합한 document를 반환하지 않는)의 전쟁이다. 결과의 첫 번째 page에 가장 적합한 document를 사용자에게 제시하는 것이 목표이다.To improve recall, we ..

2-3-07. Cross-fields Entity Search

Now we come to a common pattern: cross-fields entity search. With entities like person, product, or address, the identifying information is spread across several fields. We may have a person indexed as follows:이제 일반적인 패턴(여러 field에 대한 항목 검색 - cross fields entity search)을 시작해 보자. 사람(person), 제품(product), 주소(address) 같은 항목의 식별 정보는, 여러 field에 걸쳐 저장한다. 특정인의 정보는 아래처럼 색인될 것이다.{ "firstname": "Peter", "l..