## 搜索包含java,不包含spark(如果包含spark不会说不需要,而是降低评分) GET customer/_search { "query": { "boosting": { "positive": { "match": { "introduce": "Java" } }, "negative": { "match": { "introduce": "spark" } }, "negative_boost": 0.2 } } } ## 没有评分 GET customer/_search { "query": { "bool": { "should": [ { "constant_score": { "filter": { "match": { "introduce": "java" } } } }, { "constant_score": { "filter": { "match": { "introduce": "spark" } } } } ] } } }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)