elasticsearch关键词查询不分词

时间:2018-06-04 21:11:42   收藏:0   阅读:605
$query = [
    ‘bool‘ => [
        ‘must‘ => [
            ‘match_phrase‘ => [‘content‘ => $word] //$word词不被分词
        ],
        ‘must_not‘ => [
            ‘terms‘ => [‘fid‘=>[69, 70]], //添加not in 过滤条件
        ],
    ],
];

 

原文:https://www.cnblogs.com/dongruiha/p/9135275.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!