most_fields 7

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..

2-3-08. Field-Centric Queries

All three of the preceding problems stem from most_fields being field-centric rather than term-centric: it looks for the most matching fields, when really what we’re interested in is the most matching terms.위의 세 가지 문제점 모두는, most_fields 가 단어 중심(term-centric) 이라기 보다는, field 중심(field-centric) 이라는 사실에서 기인한다. 실제로 관심을 가지는 것은 대부분이 일치하는 단어(terms) 인데, 대부분이 일치하는 fields 를 검색한다.The best_fields type is also ..

3-1-1. Using Language Analyzers

The built-in language analyzers are available globally and don’t need to be configured before being used. They can be specified directly in the field mapping:내장된 language analyzer는 범용적으로 이용할 수 있고, 사용하기 전에 설정할 필요가 없다. field mapping에서 바로 지정할 수 있다.PUT /my_index { "mappings": { "blog": { "properties": { "title": { "type": "string", "analyzer": "english" } } } } }title field는, 기본값인 standard analyzer ..

3-3-2. You Have an Accent

English uses diacritics (like ´, ^, and ¨) only for imported words—like rôle, déjà, and däis—but usually they are optional. Other languages require diacritics in order to be correct. Of course, just because words are spelled correctly in your index doesn’t mean that the user will search for the correct spelling.영어만이 외래어(예: rôle, déjà, däis)를 위해, 발음 구별 부호(diacritics, 예: ´, ^, ¨)를 사용한다. 그러나, 일반적으로..

3-7-3. Fuzzy match Query

The match query supports fuzzy matching out of the box:match query는 기본적으로 퍼지 일치를 지원한다.GET /my_index/my_type/_search { "query": { "match": { "text": { "query": "SURPRIZE ME!", "fuzziness": "AUTO", "operator": "and" } } } }The query string is first analyzed, to produce the terms [surprize, me], and then each term is fuzzified using the specified fuzziness.query string은, 단어 [surprise, me] 를 만들어내기 위..