Empty 8

1-02-2. Cluster Health

Many statistics can be monitored in an Elasticsearch cluster, but the single most important one is cluster health, which reports a status of either green, yellow, or red:Elasticsearch cluster를 모니터링할 수 있는 많은 통계가 있지만, 가장 중요한 하나는 cluster health 이다. 이것은 green, yellow, red 중의 하나로 표시되어 status 로 보고된다.GET /_cluster/healthCOPY AS CURLVIEW IN SENSE On an empty cluster with no indices, this will return som..

1-05-1. The Empty Search

The most basic form of the search API is the empty search, which doesn’t specify any query but simply returns all documents in all indices in the cluster:search API의 가장 기본적인 형태는, 어떤 query도 지정하지 않은, empty search 이다. cluster에 있는 모든 indices의 모든 document가 반환된다.GET /_searchCOPY AS CURLVIEW IN SENSE The response (edited for brevity) looks something like this:response를 요약하면, 아래와 같다.{ "hits" : { "total"..

1-05-2. Multi-index, Multitype

Did you notice that the results from the preceding empty search contained documents of different types—user and tweet—from two different indices—us and gb?위의 empty search에서, query의 결과에 포함된 document가 2개의 다른 index(us, gb)에서 다른 type(user, tweet)을 가지고 있다는 것을 혹시 보았는가?By not limiting our search to a particular index or type, we have searched across all documents in the cluster. Elasticsearch forwarded..

1-05-3. Pagination

Our preceding empty search told us that 14 documents in the cluster match our (empty) query. But there were only 10 documents in the hits array. How can we see the other documents?이전의 empty search에서, cluster에는 (empty) query에 일치하는 14개의 document가 있다. 그런데 hits 배열에는 10개의 document만 있었다. 다른 document는 어떻게 볼 수 있을까?In the same way as SQL uses the LIMIT keyword to return a single "page" of results, Elasti..

1-06-5. Complex Core Field Types

Besides the simple scalar datatypes that we have mentioned, JSON also has null values, arrays, and objects, all of which are supported by Elasticsearch.위에서 언급한 기본 데이터 type외에도, JSON은 null 값, 배열, 오브젝트도 가질 수 있다. Elasticsearch는 이들 모두를 지원한다.Multivalue FieldseditIt is quite possible that we want our tag field to contain more than one tag. Instead of a single string, we could index an array of tags:tag..

1-07-1. Empty Search

Let’s start with the simplest form of the search API, the empty search, which returns all documents in all indices:search API의 가장 간단한 형태인, empty search로 시작해 보자. 모든 indices의 모든 document를 반환한다.GET /_search {} COPY AS CURLVIEW IN SENSE 이것이 empty request body이다.Just as with a query-string search, you can search on one, many, or _all indices, and one, many, or all types:query-string 검색과 마찬가지로, 하나 이상 ..

1-07-2. Query DSL

The query DSL is a flexible, expressive search language that Elasticsearch uses to expose most of the power of Lucene through a simple JSON interface. It is what you should be using to write your queries in production. It makes your queries more flexible, more precise, easier to read, and easier to debug.query DSL은 간단한 JSON interface를 이용해, Lucene을 100% 활용하기 위해, Elasticsearch가 사용하는 유연하고, 표현력 있는 검..

2-1-5. Dealing with Null Values

Think back to our earlier example, where documents have a field named tags. This is a multivalue field. A document may have one tag, many tags, or potentially no tags at all. If a field has no values, how is it stored in an inverted index?tags 라 이름 붙여진 field를 가진 document가 있는, 초기 예제를 다시 생각해 보자. 이 field는 다중 값 field이다. document는 하나의 태그 또는 다수의 태그를 가질 수도 있고, 어쩌면 전혀 없을 수도 있다. 만약 field가 아무런 값도 가지지 않는다면..