Paging and Sorting, ElasticSearch Flashcards
What is Elasticsearch?
Elasticsearch is a distributed search and analytics engine built on top of Apache Lucene. It’s designed for horizontal scalability, reliability, and real-time search
What is Apache Lucene?
Apache Lucene is a high-performance, full-featured text search engine library written in Java. Elasticsearch builds upon Lucene’s capabilities to provide distributed search and analytics.
What are the key features of Elasticsearch?
Distributed and scalable architecture
Near real-time search and analytics
Full-text search capabilities
Support for structured and unstructured data
RESTful API for easy integration
Powerful query DSL (Domain Specific Language)
What is a cluster in Elasticsearch?
A cluster in Elasticsearch is a collection of one or more nodes (servers) that together holds your entire data and provides federated indexing and search capabilities across all nodes.
What is a node in Elasticsearch?
A node is a single server that is part of your Elasticsearch cluster, storing data and participating in the cluster’s indexing and search capabilities.
What is an index in Elasticsearch?
An index in Elasticsearch is similar to a database in the relational database world. It is a collection of documents that have somewhat similar characteristics.
What is a document in Elasticsearch?
A document is a basic unit of information that can be indexed. It is expressed in JSON (JavaScript Object Notation) format and consists of field-value pairs.
What is a shard in Elasticsearch?
A shard is a subset of documents from an index. Elasticsearch divides an index into multiple shards to distribute data across multiple nodes and to achieve horizontal scalability.
What is a replica in Elasticsearch?
A replica is a copy of a shard. Elasticsearch creates replicas to provide high availability and failover mechanisms. Replicas also help to distribute search load across multiple nodes.
What is a query DSL in Elasticsearch?
Query DSL (Domain Specific Language) is a powerful JSON-based query language used in Elasticsearch to define various search queries and filters. It allows for complex queries to be constructed easily.
What is the purpose of an analyzer in Elasticsearch?
An analyzer is responsible for processing the text of fields in documents during indexing and search operations. It breaks down text into individual terms or tokens and applies various transformations like stemming, lowercase conversion, and removing stop words.
What are the three main types of analyzers in Elasticsearch?
Standard analyzer
Custom analyzer
Language-specific analyzer (e.g., English analyzer, French analyzer)
What is a token filter in Elasticsearch?
A token filter is a component of the analyzer that processes individual tokens generated from the text. It applies additional transformations such as lowercase conversion, stemming, synonym expansion, and stop word removal.
What is a mapping in Elasticsearch?
A mapping defines the fields and properties of documents in an index, including their data types, analyzers, and other settings. It provides the schema for the documents stored in the index.
What are dynamic mappings in Elasticsearch?
Dynamic mappings in Elasticsearch allow the index to automatically detect and create mappings for new fields in incoming documents. Elasticsearch infers the data type and other properties based on the content of the document.