URL查询

198 阅读1分钟

根据分词结果查询,查询参数进行分词

192.168.94.151:9200/user/_search?q=id:1&q=description:爱好吃东西
GET /get-together/_search?q=elasticsearch&_source_includes=name,location_group&size=2&timeout=500ms

q: 不指定字段,在所有字段中搜索

_source_includes/_source:查询结果包含字段

_source_excludes:查询结果不包含字段

size:搜几条数据

timeout:超时时间

排序+分页

192.168.94.151:9200/user/_search?q=description:爱好&from=3&size=3&sort=birthday:desc