Mapping 26

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-08-2. String Sorting and Multifields

Analyzed string fields are also multivalue fields, but sorting on them seldom gives you the results you want. If you analyze a string like fine old art, it results in three terms. We probably want to sort alphabetically on the first term, then the second term, and so forth, but Elasticsearch doesn’t have this information at its disposal at sort time.analyzed string field 또한 다중 값 field이다. 그러나 그것들..

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-09. Customizing Dynamic Mapping

If you know that you are going to be adding new fields on the fly, you probably want to leave dynamic mapping enabled. At times, though, the dynamic mapping "rules" can be a bit blunt. Fortunately, there are settings that you can use to customize these rules to better suit your data.새로운 field를 추가하려는 것을, 지금 알고 있다면, dynamic mapping을 비활성화하고 싶을 것이다. 때때로, 동적 mapping "규칙" 은 조금 무딜 수 있다. 다행히도, 데이터에 더 적합..

1-10-12. Index Aliases and Zero Downtime

The problem with the reindexing process described previously is that you need to update your application to use the new index name. Index aliases to the rescue!위에서 언급한 reindex 프로세스의 문제점은, 새로운 index 이름을 사용하기 위해, 응용프로그램을 업데이트해야 한다는 점이다. index alias가 해결책이다.An index alias is like a shortcut or symbolic link, which can point to one or more indices, and can be used in any API that expects an index nam..