Configuring Elasticsearch for Search in Mobile Apps

Configuring Elasticsearch for Search in Mobile Apps Imagine an online store with 10,000 products. A user types "Adidas sneakers" — the app freezes for 5 seconds and then shows an empty list because of a slow `LIKE` query. Conversion drops. We see this on every other project. Our team with 5 years

Development and support of all types of mobile applications:

Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1All 1734 services
Configuring Elasticsearch for Search in Mobile Apps
Medium
~2-3 days

Our competencies:

Frequently Asked Questions

Latest works

  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    897
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    784
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1216
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    1081
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    1004
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    599

Configuring Elasticsearch for Search in Mobile Apps

Imagine an online store with 10,000 products. A user types "Adidas sneakers" — the app freezes for 5 seconds and then shows an empty list because of a slow LIKE query. Conversion drops. We see this on every other project. Our team with 5 years of experience in Elasticsearch and over 30 completed projects sets up search turnkey: from data indexing to a ready UI with autocomplete and facets. We guarantee response time <200ms even on a million documents.

Why Elasticsearch Instead of LIKE Search?

LIKE in SQLite (or similar databases) cannot rank results, does not support morphology, and slows down on datasets over a thousand records. Elasticsearch provides full-text search, autocomplete, faceted filters, and relevance based on dozens of factors. Speed difference — up to 50× faster for complex queries, which is critical for e-commerce conversion. For example, a search for "sneakers" will find both "sneaker" and "sneakers" in milliseconds.

Architecture: The Mobile App Does Not Call ES Directly

The mobile client sends a request to the backend: GET /api/search?q=sneakers&category=sport. The backend (Laravel/Node) performs the search in Elasticsearch and returns a paginated response. Reasons:

  • Security: index structure and credentials are hidden from the client.
  • Caching: the server caches popular queries, reducing load on ES.
  • Load control: a thousand simultaneous clients do not overload the cluster.
Criteria LIKE Elasticsearch
Query time (1M rows) > 5 s < 200 ms
Morphology no full
Ranking no by relevance

Configuring the Index

For Russian text, a morphological analyzer is mandatory. We use the built-in russian or the analysis-morphology plugin. Without it, the query "sneakers" won't find "sneaker". Example mapping:

{ "mappings": { "properties": { "name": { "type": "text", "analyzer": "russian", "fields": { "keyword": { "type": "keyword" } } } } } } 

The keyword field is needed for sorting and aggregations — text is not suitable for that.

Analyzer Morphology Performance License
russian + high built-in
analysis-morphology ++ medium plugin

Elasticsearch is an industry standard; for Russian content, russian is preferred.

How to Implement Autocomplete and Pagination?

Autocomplete (search-as-you-type) is implemented using a field of type search_as_you_type or the completion suggester. The client sends a request on each keystroke with a 300ms debounce, the server returns up to 7 suggestions. For pagination, we use search_after instead of the standard from/size, which is limited to 10,000 results. This enables infinite scroll without a "next page" button.

How We Configure Search for Clients?

Our process includes five stages:

  1. Data analysis: study product structure, determine fields for indexing, normalize attributes.
  2. Index design: choose analyzers, set up mapping and auto-updates via Logstash or Kafka.
  3. API implementation: create an endpoint with pagination (search_after), facets, and autocomplete. Document in Swagger.
  4. Mobile app integration: connect the API, build UI (skeleton, debounce, infinite scroll). Native SDKs (Alamofire, Retrofit) handle requests.
  5. Testing and monitoring: check speed (<500ms), enable slowlog, set up alerts in Kibana.

Let's break down a typical case. Client — a marketplace with 50,000 products. Elasticsearch cluster of 3 nodes, indexing via Kafka. After integration, average response time dropped from 3s to 150ms, cart abandonment decreased by 30%. This required configuring the russian analyzer with a custom stop word list and adding boosting by product rating.

What's Included in the Work?

  • Documentation on search architecture and query schemas.
  • Access to the Elasticsearch server and configured monitoring (Kibana, Grafana).
  • Backend controller source code with sample requests (REST, GraphQL).
  • Team training: how to update the index, add fields, change relevance.
  • One month of support after launch.

Monitoring and Performance

Slow queries (>500ms) are logged via the Elasticsearch slowlog. On the mobile app, we show skeleton placeholders; on a >3s delay — a message "Search taking longer than usual". Baseline metrics: average response time <200ms, error rate <0.5%.

Timelines and Cost

Basic integration (index + API + search UI) takes 1–2 weeks. Full package (facets, autocomplete, offline cache) — 3–4 weeks. Cost is calculated individually after assessing data volume and complexity.

We are ready to take on your project. Contact us — we will prepare an architectural solution and an accurate estimate. Get a consultation by leaving your request.