Elasticsearch 面接の質問と回答
質問 31. What is a shard in Elasticsearch?
A shard is a basic unit of storage and search in Elasticsearch. Indexes are divided into shards to distribute data across multiple nodes for scalability.
Example:
PUT /my_index/_settings
{
"number_of_shards": 5
}
質問 32. How does Elasticsearch handle security?
Elasticsearch provides security features like role-based access control, SSL/TLS encryption, and authentication mechanisms.
質問 33. Explain the purpose of the term 'mapping' in Elasticsearch.
Mapping in Elasticsearch is the process of defining how a document and its fields are stored and indexed. It helps in defining the data type, analysis, and other properties.
Example:
PUT /my_index
{
"mappings": {
"properties": {
"title": { "type": "text" }
}
}
}
質問 34. Explain the term 'Bulk API' in Elasticsearch.
The Bulk API allows for the efficient indexing and deletion of multiple documents in a single request.
質問 35. What is the role of a filter in Elasticsearch?
Filters in Elasticsearch are used to narrow down the search results based on specific criteria. They are applied to queries to exclude or include documents in the search.
Example:
GET /my_index/_search
{
"query": {
"bool": {
"filter": {
"range": {
"price": { "gte": 20 }
}
}
}
}
}
ユーザー評価で最も役立つ内容: