Skip to main content
PreparationZone Logo
PrepZone

Full-Text Search Queries

match, bool, fuzzy, and term queries for product search that tolerates typos.

Pass checkpoint below

Why this matters

  • VaultCommerce search must tolerate typos (backpak), boost title matches over description, and filter by category without affecting score.
  • Using match on a keyword field or term on analyzed text silently returns wrong results — the #1 Elasticsearch bug in production.
  • Relevance tuning (boost, minimum_should_match, fuzziness) directly impacts conversion rate.
Cluster
Node 1Shard 0 primary
Node 2Shard 1 primary
Node 3Shard 0 replica
An index is split into shards across nodes. Replicas provide failover and read scaling.

match: analyzed full-text

Java
GET /vaultcommerce-products/_search
{
  "query": {
    "match": {
      "title": {
        "query": "trail pack waterproof",
        "operator": "and"
      }
    }
  }
}

The analyzer tokenizes input the same way it tokenized indexed text — lowercase, stemming optional, stop words removed per analyzer config.

The rest of this guide is part of Pro

Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.

Still to come · 3 sections

  • bool: filter + must + should
  • Term-level queries on keywords
  • Multi-match and autocomplete

Test yourself

Answer these before moving on — recall is what makes it stick.