Solr的分组参数group.format =简单不适用于我

时间:2019-04-24 09:54:23

标签: solr lucene

我正在对solr查询结果进行分组,因此它分为多个组。要将所有这些组的结果合并到一个列表中,我正在使用"group.format=simple"。但是我认为它没有用。有人可以帮我解决这个问题,或者提供一个样本来说明如果"group.format=simple"在起作用的情况。请帮助

Solr查询:

http://localhost:8983/solr/core/select?q=((value1:“ solr search”)^ 10 OR(value1:solr and value1:search)^ 9)OR(value1:solr OR value1:search)&fl = id,score&group.limit = 5&group = true&group .query =(value1:“ solr search”)&group.query =((value1:solr AND value1:search)-(value1:“ solr search”))&group.query =((value1:solr OR value1:search)- (value1:“ solr search”)-(value1:solr AND value1:search))&group.format = simple&group.sort = plan desc&wt = json

响应:

{
  "responseHeader": {
    "status": 0,
    "QTime": 5,
    "params": {
      "q": "((value1:\"solr search\")^10 OR\r\n(value1:solr AND value1:search)^9) OR value1:solr OR value1:search",
      "group.sort": "plan desc",
      "group.format": "simple",
      "fl": "id,score",
      "group.limit": "5",
      "group.query": [
        "(value1:\"solr search\")",
        "((value1:solr AND value1:search)-(value1:\"solr search\"))",
        "((value1:solr OR value1:search)-(value1:\"solr search\") -(value1:solr AND value1:search))"
      ],
      "wt": "json",
      "group": "true"
    }
  },
  "grouped": {
    "(value1:\"solr search\")": {
      "matches": 21401,
      "doclist": {
        "numFound": 110,
        "start": 0,
        "maxScore": 66.0048,
        "docs": [
          {
            "id": "MBO088",
            "score": 47.717316
          },
          {
            "id": "MBO010",
            "score": 52.34251
          },
          {
            "id": "MCC011",
            "score": 62.8052
          }
        ]
      }
    },
    "((value1:solr AND value1:search)-(value1:\"solr search\"))": {
      "matches": 21401,
      "doclist": {
        "numFound": 4825,
        "start": 0,
        "maxScore": 32.28555,
        "docs": [
          {
            "id": "MAA514",
            "score": 21.143295
          },
          {
            "id": "MAA516",
            "score": 21.143295
          },
          {
            "id": "MAA518",
            "score": 21.143295
          },
          {
            "id": "MAA520",
            "score": 21.143295
          }
        ]
      }
    },
    "((value1:solr OR value1:search)-(value1:\"solr search\") -(value1:solr AND value1:search))": {
      "matches": 21401,
      "doclist": {
        "numFound": 16466,
        "start": 0,
        "maxScore": 2.1915653,
        "docs": [
          {
            "id": "MPA024",
            "score": 0.888321
          },
          {
            "id": "MAA502",
            "score": 1.317673
          }
        ]
      }
    }
  }
}

0 个答案:

没有答案