《Elasticsearch:权威指南》Query DSL -- Term-level queries

Elasticsearch:权威指南6.8.6目录

Term-level queries (精确值查询)

您可以使用 term-level queries(精确值查询)并根据结构化数据中的精确值查找文档。 结构化数据的示例包括日期范围,IP地址,价格或产品ID。

full-text queries (全文查询) 不同,term-level queries(精确值查询)不分析搜索词。 而是,精确值查询匹配存储在字段中的确切术语。

term-level queries 仍然使用normalizer属性对keyword字字段的搜索项进行标准化。 有关更多详细信息,请参见normalizer(规范化器)。

Types of term-level queries

  • term query

    根据提供的字段,查找符合一条精确值的文档。类似mysql中的 “=”操作;

  • terms query

    跟term query相似,查找符合一组精确值的文档

  • terms_set query
    Returns documents that contain a minimum number of exact terms in a provided field. You can define the minimum number of matching terms using a field or script.

  • range query

    范围搜索

  • exists query

    检查值是否存在,不返回具体的值

  • prefix query

    前缀搜索

  • wildcard query

    通配符搜索

  • regexp query

    正则表达式搜索

  • fuzzy query

模糊匹配,类似mysql中的”like %关键词% “查询操作;
返回包含与搜索词相似的词的文档。 Elasticsearch使用Levenshtein编辑距离来衡量相似性或模糊性。

  • type query

    查找索引下对应的type

  • ids query

    根据给定的id搜索

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值