elasticsearch的cross_fields查询
生活随笔
收集整理的這篇文章主要介紹了
elasticsearch的cross_fields查询
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.most_fields?這種方式搜索也存在某些問題
- 它不能使用?operator?或?minimum_should_match?參數來降低次相關結果造成的長尾效應。
2.詞?peter?和?smith?都必須出現,但是可以出現在任意字段中。
3.cross_fields?類型首先分析查詢字符串并生成一個詞列表,然后它從所有字段中依次搜索每個詞。這種不同的搜索方式很自然的解決了?字段中心式?查詢三個問題中的二個
4.經典案例
GET /_validate/query?explain {"query": {"multi_match": {"query": "peter smith","type": "cross_fields", "operator": "and","fields": [ "first_name", "last_name" ]}} }參考:https://www.elastic.co/guide/cn/elasticsearch/guide/current/_cross_fields_queries.html
轉載于:https://www.cnblogs.com/hixiaowei/p/11253788.html
總結
以上是生活随笔為你收集整理的elasticsearch的cross_fields查询的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 理解可变参数的原理
- 下一篇: CSS-10-内边距