wasAsked.

Search Index Experience: Do you have experience with search indexes — Solr, Elasticsearch?

Dodge Construction Network · Senior Developer · technical

Published

Asked in 2026 · SQL, Elasticsearch

Community answers

Posted by wasAsked editorial collection

Answer with concrete experience: which engine, what you built, and how you kept the index in sync. A sample answer: "Yes — mainly Elasticsearch (and Amazon OpenSearch), and some exposure to Solr and Azure AI Search. Both Elasticsearch and Solr are built on Apache Lucene, so the concepts carry over: inverted indexes, analyzers, relevance scoring and distributed shards." What I built - Product and document search with full-text matching, relevance tuning and typo tolerance (fuzziness). - Filters and faceted navigation: categories, brands, price ranges, availability, implemented as filter clauses and aggregations. - Autocomplete using edge n-gram analyzers or completion suggesters. - Sorting by relevance, price, rating or recency, and pagination with search_after for deep results. Index design - Explicit mappings: text fields with analyzers (lowercase, stemming, synonyms, language analyzers), keyword fields for exact filtering, sorting and aggregations, and numeric and date types for ranges. - Index aliases to rebuild indexes with new mappings and switch atomically with zero downtime. - Shard and replica counts sized for data volume and query load. Keeping the index in sync with the database - The database is the source of truth. Changes publish events (transactional outbox or change data capture); a background worker updates the search index through the bulk API, idempotently, using the database ID as the document ID. - A full reindex job rebuilds the index when needed, and a reconciliation check detects drift. Relevance tuning - Field boosting (title more important than description), function_score for popularity and recency, synonyms, and testing changes against a set of known queries before release. Operations - Monitoring cluster health, query latency, indexing rate and JVM heap; index lifecycle management for log indices; snapshots for backup. - Security: authentication, TLS, role-based access, and never exposing the cluster directly to browsers. SQL vs search engine "For simple prefix lookups, a database index or full-text index may be enough. We moved to Elasticsearch when we needed relevance ranking, fuzzy matching, facets and fast search over millions of documents, which SQL LIKE queries could not provide efficiently."

Ravindra Wadile · · 0 likes

Sign in to add your answer

Related interview topics