elasticsearch过滤空字符串并加一些需求

{
    "query":{
        "constant_score":{
            "filter":{
                "bool":{
                    "must_not":{
                        "bool":{
                            "must_not":[
                                {
                                    "wildcard":{
                                        "content":"*"
                                    }
                                },
                                {
                                    "term":{
                                        "user_id":241448230
                                    }
                                }
                            ]
                        }
                    },
                    "must":[
                        {
                            "term":{
                                "is_online":true
                            }
                        },
                        {
                            "term":{
                                "is_deleted":false
                            }
                        },
                        {
                            "term":{
                                "pictorial_id":1
                            }
                        }
                    ]
                }
            }
        }
    }
}

转载于:https://www.cnblogs.com/lixiaofang-123/p/11543908.html

你可能感兴趣的:(elasticsearch过滤空字符串并加一些需求)