9.3.5 Search API概览

Search API

  • URI Search

    • 在URL中使用查询参数

  • Request Body Search

    • 使用Elasticsearch提供的,基于JSON格式的更加完备的Query Domain Specific Language (DSL)

指定查询的索引

URI查询

  • 使用"q",指定查询字符串

  • "query string syntax",KV键值对

举例

Request Body

搜索Response字段说明

衡量相关性

  • Information Retrieval(检索)

    • Rrecision(查准率) - 尽可能返回较少的无关文档

    • Recall (查全率)- 尽量返回较多的相关文档

    • Ranking - 是否能够按照相关度进行排序

Last updated

Was this helpful?