我试图根据我在映射中设置的完成上下文来过滤完成建议结果 . 这是一个示例查询 .

POST jekyll/_suggest?pretty
{
    "title-author-suggestion" : {
        "prefix" : "Donald",
        "completion" : {
            "field" : "Suggest",
            "contexts" : {
              "Tags" : "general",
              "Authors" : "Katie Reilly"
            } 
        }
    }
}

我遇到的问题是结果似乎是使用 OR 效果进行过滤,而不是 AND 效果 .

例如,假设我有这两个文件 .

{
    "Title" : "Donald Duck is amazing",
    "Tags" : [ "general" ],
    "Authors" : [ "Bob" ]
}

{
    "Title" : "Donald Trump is president, whaaaat?!",
    "Tags" : [ "general" ],
    "Authors" : [ "Katie Reilly" ]
}

我想,运行一个完成建议查询,就像我问题顶部的查询一样,会给我1个文档的结果 .

{
    "Title" : "Donal Duck is amazing",
    "Tags" : [ "general" ],
    "Authors" : [ "Katie Reilly" ]
}

相反,我得到了两份文件 .

Is there a way to change the behavior on a Completion suggestion query to exhibit the behavior I expect or do I just have to not use the Completion suggestion?