index 25

1-03-03. Indexing a Document

Documents are indexed—stored and made searchable—by using the index API. But first, we need to decide where the document lives. As we just discussed, a document’s _index, _type, and _iduniquely identify the document. We can either provide our own _id value or let the index API generate one for us.document는 index API에 의해 색인된 (저장되고 검색 가능하도록 만들어진)다. 그러나 먼저, document를 어디에 저장할지를 결정해야 한다. 방금 이야기했듯이, d..

1-03-06. Updating a Whole Document

Documents in Elasticsearch are immutable; we cannot change them. Instead, if we need to update an existing document, we reindex or replace it, which we can do using the same index API that we have already discussed in Indexing a Document.Elasticsearch에서 document는 불변 이다. document를 변경할 수 없다. 대신, 기존의 document를 업데이트하려면, reindex 또는 replace해야 한다. Indexing a Document에서 이미 이야기했던 것과 동일한 index API를 사용할 수 ..

1-03-09. Dealing with Conflicts

When updating a document with the index API, we read the original document, make our changes, and then reindex the whole document in one go. The most recent indexing request wins: whichever document was indexed last is the one stored in Elasticsearch. If somebody else had changed the document in the meantime, their changes would be lost.index API를 사용하여 document를 업데이트하는 경우, 원래의 document를 읽고, 변경을 ..

1-03-13. Cheaper in Bulk

In the same way that mget allows us to retrieve multiple documents at once, the bulk API allows us to make multiple create, index, update, or delete requests in a single step. This is particularly useful if you need to index a data stream such as log events, which can be queued up and indexed in batches of hundreds or thousands.mget 이 다수의 document를 한번에 가져오는 것과 마찬가지로, bulk API는 다수의 create, index,..

1-06-4. Mapping

In order to be able to treat date fields as dates, numeric fields as numbers, and string fields as full-text or exact-value strings, Elasticsearch needs to know what type of data each field contains. This information is contained in the mapping.date field를 날짜로, 숫자 field를 숫자로, string field를 full-text나 exact-value 문자열로 처리하기 위해서는, Elasticsearch는 각 field가 가지고 있는 데이터의 type을 알아야 한다. 이 정보는 mapping에 있다...

1-09. Distributed Search Execution

Before moving on, we are going to take a detour and talk about how search is executed in a distributed environment. It is a bit more complicated than the basic create-read-update-delete(CRUD) requests that we discussed in Distributed Document Store.더 나아가기에 앞서, 분산 환경에서 검색을 실행하는 방법에 대해 이야기하려 한다. 이것은 Distributed Document Store에서 이야기했던, 기본적인 CRUD(create-read-update-delete) 보다 약간 더 복잡하다.Content Warni..

1-10-02. Deleting an Index

To delete an index, use the following request:index를 삭제하기 위해서, 아래 request를 사용한다.DELETE /my_indexYou can delete multiple indices with this:아래와 같이, 다수의 indices를 지울 수도 있다.DELETE /index_one,index_two DELETE /index_*You can even delete all indices with this:_모든_ indices를 지울 수도 있다.DELETE /_all DELETE /*For some, the ability to delete all your data with a single command is a very scary prospect. If you..

1-10-03. Index Settings

There are many many knobs that you can twiddle to customize index behavior, which you can read about in the Index Modules reference documentation, but…index의 동작을 조절하기 위한, 아주 많은 변수가 있다. Index Modules reference documentation에서 참고할 수 있다. 그러나…Elasticsearch comes with good defaults. Don’t twiddle these knobs until you understand what they do and why you should change them.Elasticsearch는 좋은 기본값을 가지고 있..