Elasticsearch easy
Search performance is highly dependent on 'Mappings'. What is the role of a Mapping in an Elasticsearch index?
- A It defines the geographical region where the data is stored for GDPR compliance.
- B It defines the schema—specifying field data types (date, integer, text, etc.) and how they should be analyzed for search.
- C It is a visual representation of how nodes are connected in the cluster.
- D It maps the relationship between two different tables via foreign keys.
Answer: B. It defines the schema—specifying field data types (date, integer, text, etc.) and how they should be analyzed for search.
While Elasticsearch 'Dynamic Mapping' can guess types, explicit mapping is best practice. For example, you must tell ES that 'Status' is a `keyword` (exact match) rather than `text` (full-text search) to enable efficient filtering and aggregations.
One system design question a day, with spaced repetition so the ones you miss come back.
Get the appRelated questions
- What are the two primary reasons for configuring one or more 'Replica Shards' for an index?
- When a String field is mapped as `text`, what process is performed to enable full-text search capability?
- What is the primary benefit of splitting an Elasticsearch index into multiple 'Primary Shards'?
- Every document stored in an Elasticsearch index is uniquely tracked by which mandatory metadata field?
- Elasticsearch search results include a metadata field called `_score`. What does this value primarily indicate?
- What is the primary architectural purpose of Elasticsearch in a modern software stack?