1. Which library provides the core indexing and scoring inside Elasticsearch?
- RocksDB
- Apache Kafka
- Apache Lucene
- Apache Spark
जवाब देखें
जवाब: Apache Lucene
Each Elasticsearch shard is a Lucene index.
Elasticsearch कोर्स के 25 सवाल, हर सवाल के सही जवाब और explanation के साथ। जवाब देखने से पहले ख़ुद सोचें।
जवाब: Apache Lucene
Each Elasticsearch shard is a Lucene index.
जवाब: Each term to the documents that contain it
Looking up a term returns its postings list directly.
पाठ: The Inverted Index
जवाब: number_of_replicas
Replica count is dynamic; primary count is fixed at creation.
जवाब: Newline-delimited JSON with action and source lines
NDJSON lets the coordinating node split the request without parsing it as one big document.
जवाब: keyword
keyword stores the exact value and supports aggregations via doc values.
जवाब: Create a new index with the new mapping and reindex the data
Existing field types cannot be changed in place.
जवाब: Exactly one
Character and token filters are optional and can be many; the tokenizer is required and single.
पाठ: How Analyzers Work
जवाब: The synonym list can be updated without reindexing documents
Search-time synonyms change queries, not stored terms.
जवाब: Run _analyze on both the document text and the query text with the field's analyzers
Comparing produced terms reveals analysis mismatches.
जवाब: match_phrase
match_phrase uses term positions; slop relaxes adjacency.
जवाब: In filter, using a term query
Filter context is exact, unscored and cacheable.
जवाब: A term that is rare across the index
Inverse document frequency rewards rare terms; filters do not score.
जवाब: Each shard returns only its own top terms before results are merged
shard_size and doc_count_error_upper_bound address this.
जवाब: An approximate count of distinct values
It uses HyperLogLog++ with a precision_threshold.
जवाब: Only the returned hits, not the aggregations
Aggregations are computed before post_filter is applied.
जवाब: search_after with a point in time
It avoids collecting from + size hits on every shard.
जवाब: multi_match with type bool_prefix over the field and its n-gram sub-fields
bool_prefix treats the last term as a prefix.
जवाब: Improves recall at the cost of more work per shard
More candidates are explored in the HNSW graph.
जवाब: Yellow, because replicas cannot be placed on the node holding the primary
All primaries are assigned but replicas are not.
जवाब: @timestamp
Data streams are designed for time-series, append-only data.
जवाब: The remove and add actions apply atomically, so clients never see no index
Atomic alias updates make the cutover seamless.
जवाब: Disabling refresh and replicas during the load, then restoring them
Fewer refreshes and no replication during the load reduce work.
पाठ: Performance Tuning
जवाब: Through a backend that builds queries and calls a private cluster with a least-privilege API key
Keep the cluster private and the credentials server-side.
पाठ: Security
जवाब: A failure between the two writes leaves the database and the index inconsistent
Outbox or CDC ties index updates to committed database changes.
जवाब: Applications access indices through aliases so reindexing does not need downtime
Aliases make migrations routine.