Full-Text vs Keyword Search
Full-text, search, (match, query, "text" fields, PAR), ANALYSIS, se, GUZARTI, hai, aur, RESULTS, ko, RELEVANCE, SCORE, (BM25, algorithm) ke, HISAAB, se, RANK, karti, hai.
Keyword, search, (term, query, "keyword" fields, PAR), BINARY, hai — YA, TO, EXACT, MATCH, hai, YA, NAHI, hai — filters, SORTING, aur, exact-value, AGGREGATIONS, ke, liye, IDEAL, hai.
GET /products/_search
{ "query": { "match": { "description": "running shoes" } } }- Full-text search = analysis + BM25 relevance scoring
- Keyword search = binary exact-match, no scoring variation
- Filters, sorting, aggregations ke liye keyword fields ideal hain
Full-text, search, (match, query, "text" fields, PAR), ANALYSIS, (tokenizing, stemming, LOWERCASING) se, GUZARTI, hai, aur, RESULTS, ko, RELEVANCE, SCORE, (BM25, algorithm) ke, HISAAB, se, RANK, karti, hai.
# "running shoes" match karega "run shoes", "RUNNING SHOE" waghera bhi (stemming ke through)
GET /products/_search
{ "query": { "match": { "description": "running shoes" } } }Keyword, search, (term, query, "keyword" fields, PAR), BINARY, hai, — YA, TO, EXACT, MATCH, hai, YA, NAHI, hai. koi, PARTIAL, MATCH, koi, RELEVANCE, SCORING, VARIATION, NAHI, hoti — filters, SORTING, aur, exact-value, AGGREGATIONS, ke, liye, IDEAL, hai.