ES 常用API
cat
cluster
search
search后面可以跟url参数,也可以es自己的查询结构体
-
url参数查询
-
query match查询(match all,match,match_phrase,match_phrase_prefix)
-
query_string查询(fields和query,单个查询default_field)
-
match(keyword会精准查询,text会分词)模糊查询会分词,term精确查询不会分词
-
bool查询(分为 must,fliter必须满足条件,should满足一个就行)
-
index操作是针对整个索引的
- 可以自动创建 id PUT clothes/doc { "name":"test", "value":"test" },也可以指定)。
- 可以更新索引 PUT clothes/_create/6 { "name":"test", "value":"test" }需要指定id,post和put的区别,put必须要指定id才行,而且put是幂等性的,put更新是直接将更新的内容覆盖,而put是只更新要改的内容。