在搜索弹性搜索时获得不必要的结果?

时间:2017-01-20 10:12:24

标签: elasticsearch liferay liferay-7

我已将liferay dxp与弹性搜索集成在一起。我正在搜索包含“hello”作为内容的网页内容。我只有一个以“你好”作为内容的艺术品。但我通过搜索查询获得了28个结果。我的查询如下: -

{
  "bool": {
    "must": [
      {
        "match": {
          "entryClassName": {
            "query": "com.liferay.journal.model.JournalArticle",
            "type": "boolean"
          }
        }
      },
      {
        "match": {
          "status": {
            "query": "0",
            "type": "boolean"
          }
        }
      },
      {
        "match": {
          "content": {
            "query": "Hello",
            "type": "boolean"
          }
        }
      }
    ]
  }
}

网址请求为 http://localhost:9200/liferay-20116/LiferayDocumentType 在这个搜索中,我得到28个结果,其中只有一个结果是正确的。我不知道为什么期刊文章的过滤器没有按预期工作。请提前帮助..暂时..

0 个答案:

没有答案
相关问题