source 6

1-03-11. Partial Updates to Documents

In Updating a Whole Document, we said that the way to update a document is to retrieve it, change it, and then reindex the whole document. This is true. However, using the update API, we can make partial updates like incrementing a counter in a single request.Updating a Whole Document에서, document를 업데이트하는 방식은 document를 가져와서 수정하고, 전체 document를 다시 색인 한다고 언급했다. 이것은 사실이다. 그러나 update API를 사용하면, 단일 req..

1-03-12. Retrieving Multiple Documents

As fast as Elasticsearch is, it can be faster still. Combining multiple requests into one avoids the network overhead of processing each request individually. If you know that you need to retrieve multiple documents from Elasticsearch, it is faster to retrieve them all in a single request by using the multi-get, or mget, API, instead of document by document.Elasticsearch가 빠른 만큼, 여전히 더 빨라질 수 있다. ..

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-10-07. The Root Object

The uppermost level of a mapping is known as the root object. It may contain the following:mapping의 최상위 단계는 root object 로 알려져 있다. 아래와 같은 것을 포함하고 있다.A properties section, which lists the mapping for each field that a document may containdocument가 가지게 될, 각 field의 mapping을 나열하는 properties 부분.Various metadata fields, all of which start with an underscore, such as _type, _id, and _source_type, _id, _..

1-10-08. Dynamic Mapping

When Elasticsearch encounters a previously unknown field in a document, it uses dynamic mappingto determine the datatype for the field and automatically adds the new field to the type mapping.Elasticsearch가 document에서 이전에 알려지지 않은 field를 만난 경우, field의 데이터 type을 결정하고, 자동으로 type mapping에 새로운 field를 추가하기 위해, dynamic mapping을 사용한다.Sometimes this is the desired behavior and sometimes it isn’t. Perhaps..

1-10-11. Reindexing Your Data

Although you can add new types to an index, or add new fields to a type, you can’t add new analyzers or make changes to existing fields. If you were to do so, the data that had already been indexed would be incorrect and your searches would no longer work as expected.index에 새로운 type을 추가하거나 type에 새로운 field를 추가할 있지만, 새로운 analyzer를 추가하거나 기존 field를 변경할 수 없다. 그렇게 하면, 기존의 색인 데이터는 올바르지 않게 되고, 검색은 더 이상 ..