Elasticsearch Search Setup for Mobile App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
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 1 servicesAll 1735 services
Elasticsearch Search Setup for Mobile App
Medium
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Elasticsearch Setup for Search in Mobile Application

Native database search via LIKE '%query%' doesn't work for products with thousands of records: slow, no relevance, no match highlighting, no full-text search with morphology. Elasticsearch solves all these problems, but requires proper server-side setup and smart mobile client integration.

Architecture: Mobile App Never Calls ES Directly

Main rule: mobile client never makes requests directly to Elasticsearch. Always via backend API. Reasons—security (don't expose index structure and credentials), server-side caching possible, load control.

Typical scheme: mobile app → GET /api/search?q=sneakers&category=sport&page=1 → Laravel/Node backend → Elasticsearch → response with pagination and metadata.

Index Configuration

For Russian-language content, analyzer with morphology is mandatory. Use analysis-morphology plugin (from Artifact) or analysis-russian (built into ES). Without morphology, search "krossovki" won't find "krossovok" or "krossovka".

Example field mapping with Russian analyzer:

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

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

What Matters for Mobile UX

Suggestions on input (autocomplete). Implement via completion suggester or search_as_you_type field type. Latter simpler to configure and works well for short queries:

"title": {
  "type": "search_as_you_type"
}

Requests go on every field change with 300ms debounce. Show max 5-7 suggestions.

Faceted search (filters). ES aggregations let you get product count in each category/brand in one request. In mobile app—bottom sheet with filters, chips values update on each filter change without requery (use cached aggregations).

Relevance and ranking. function_score query lets you boost rating for new products, highly-rated products, or personalized results. Typical e-commerce formula: base text score × popularity boost × date decay function.

Pagination. Standard from/size works only up to 10,000 results (index.max_result_window limit). For cursor pagination use search_after with sort by unique field. In mobile app—infinite scroll without "next page" button.

Offline Search

ES requires network. For basic offline search: cache last results in SQLite, search cache via FTS5 (CREATE VIRTUAL TABLE ... USING fts5). Quality lower but works offline.

Monitoring and Performance

Slow ES queries (over 500ms) need logging. Enable slowlog on server—ES logs queries over threshold. In mobile app show skeleton placeholders while searching, and show "Search taking longer than usual" if request doesn't return in 3 seconds.

Timeline: ES index setup with Russian morphology, search API integration, basic search UI—1-2 weeks. Faceted search, autocomplete, offline cache—3-4 weeks.