score 28

2-6-03. Query-Time Boosting

In Prioritizing Clauses, we explained how you could use the boost parameter at search time to give one query clause more importance than another. For instance:Prioritizing Clauses에서, 어떤 query 절이 다른 것보다 더 중요하다는 의미로, 검색 시에 boost 매개변수를 사용하는 방법을 설명한 바 있다. 예를 들면,GET /_search { "query": { "bool": { "should": [ { "match": { "title": { "query": "quick brown fox", "boost": 2 } } }, { "match": { "content"..

2-6-04. Manipulating Relevance with Query Structure

The Elasticsearch query DSL is immensely flexible. You can move individual query clauses up and down the query hierarchy to make a clause more or less important. For instance, imagine the following query:Elasticsearch의 query DSL은 매우 유연하다. 개별 query 절을, 절의 중요도에 따라, query 계층 구조의 위아래로 옮길 수 있다. 예를 들어, 아래 query를 가정해 보자.quick OR brown OR red OR foxWe could write this as a bool query with all terms at t..

2-6-08. Boosting by Popularity

Imagine that we have a website that hosts blog posts and enables users to vote for the blog posts that they like. We would like more-popular posts to appear higher in the results list, but still have the full-text score as the main relevance driver. We can do this easily by storing the number of votes with each blog post:사용자들이 자기가 좋아하는 블로그 게시물에 투표할 수 있는 기능이 있는 website를 가정해 보자. 결과 목록에서 더 높게 나타나는 ..

2-6-09. Boosting Filtered Subsets

Let’s return to the problem that we were dealing with in Ignoring TF/IDF, where we wanted to scorevacation homes by the number of features that each home possesses. We ended that section by wishing for a way to use cached filters to affect the score, and with the function_score query we can do just that.Ignoring TF/IDF에서 다루었던 문제로 돌아가 보면, 여기에서는 각 여름용 별장이 가지고 있는 기능의 수로, 별장에 score를 계산하려 했다. score에 ..

2-6-12. Understanding the price Clause

The price clause is a little trickier. The user’s preferred price is anything up to £100, but this example sets the origin to £50. Prices can’t be negative, but the lower they are, the better. Really, any price between £0 and £100 should be considered optimal.price 절은 약간 교묘하다. 사용자의 선호 가격은 £100 이하이다. 그러나, 이 예제에서 origin은 £50으로 설정되어 있다. 가격은 –(negative)가 될 수 없다. 그러나 낮을수록 더 좋아한다. 실제로 £0과 £100 사이의 모든 ..

3-4-6. Stemming in situ

For the sake of completeness, we will finish this chapter by explaining how to index stemmed words into the same field as unstemmed words. As an example, analyzing the sentence The quick foxes jumped would produce the following terms:완벽을 기하기 위하여, 형태소 분석을 하지 않은 단어와 형태소 분석을 한 단어를, 동일한 field에 색인하는 방법을 설명하면서, 이 장를 마무리하겠다. 예를 들어, The quick foxes jumped 라는 문장을 분석하면, 아래와 같은 단어를 얻을 수 있다.Pos 1: (the) Pos..

3-7-4. Scoring Fuzziness

Users love fuzzy queries. They assume that these queries will somehow magically find the right combination of proper spellings. Unfortunately, the truth is somewhat more prosaic.사용자들은 fuzzy query를 좋아한다. 이들 query가 적절한 맞춤법의 올바른 조합을, 왠지 마술처럼 찾을 거라 생각한다. 유감스럽게도, 진실은 어느 정도 더 평범하다.Imagine that we have 1,000 documents containing "Schwarzenegger", and just one document with the misspelling "Schwarzenege..