elasticsearch 查询 DSL 指定分词器
所属分类 elasticsearch
浏览量 902
/articles/_search
{
"profile":"true",
"query":{
"match":{
"title":"Java架构师"
}
}
}
"type": "BooleanQuery",
"description": "title:java title:架构师 title:架构 title:师",
三个子查询
"total": 110,
"max_score": 16.606647,
指定分词器为 ik_smart
{
"profile":"true",
"query": {
"match": {"title":{"query" : "Java架构师","analyzer" : "ik_smart"}}
}
}
"type": "BooleanQuery",
"description": "title:java title:架构师",
二个子查询
"total": 92,
"max_score": 7.8367853,
operator minimum_should_match 使用
{
"profile":"true",
"query": {
"match": {
"content": {
"query": "java架构师",
"operator": "or",
"minimum_should_match": 2
}
}
}
}
"type": "BooleanQuery",
"description": "(content:java content:架构师 content:架构 content:师)~2",
{
"profile":"true",
"query": {
"match": {
"content": {
"query": "java架构师",
"operator": "and"
}
}
}
}
"type": "BooleanQuery",
"description": "+content:java +content:架构师 +content:架构 +content:师",
注意 and 与 or 的区别
"description": "(content:java content:架构师 content:架构 content:师)~2",
"description": "+content:java +content:架构师 +content:架构 +content:师",
上一篇
下一篇
elasticsearch使用7大原则
elasticsearch profile 使用简介
Elasticsearch聚合分析简介
elasticsearch query 和 filter 的区别
doc_values和fielddata
Elasticsearch zen discovery