Query and index Elasticsearch with proper mappings, analyzers, and search patterns.
keyword for exact match/aggregations—using text for IDs breaks filtersdynamic: "strict" to reject unmapped fields—catches typos in field namestext is analyzed (tokenized, lowercased)—"Quick Brown" matches search for "quick"title.raw, search on INLINECODE7bool.must for scoring, bool.filter for filtering without scoringstandard analyzer lowercases and removes punctuation—fine for most textenglish) stem words—"running" matches "run"_analyze endpoint before indexing—surprises in production hurt{"tags": [{"key":"a","val":1}, {"key":"b","val":2}]} becomes INLINECODE15key=a AND val=2 incorrectly matches abovenested type to preserve object boundaries—requires nested query wrapperfrom + size limited to 10,000 hits—deep pagination fails_bulk API, 5-15MB batchesrefresh=false during bulk loads—refresh after batch completes_source: false with stored_fields if you don't need full document—reduces I/Ofilter for cacheable conditions—Elasticsearch caches filter results*term)—forces full scan; use reverse field for suffix searchterms agg needs keyword field—text fields fail or give garbagesize: 10 on terms agg—increase to get all buckets, or use compositenested wrapper—matches nested query patternretry_on_conflict or use optimistic lockingindex.mapping.total_fields.limit and use strict mapping该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 elasticsearch-1776420004 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 elasticsearch-1776420004 技能
skillhub install elasticsearch-1776420004
文件大小: 2.79 KB | 发布时间: 2026-4-17 20:12