我在下面使用此查询获得Solr XML响应: http://localhost:8983/solr/trl/select/?indent=off&facet=false&wt=xml&fl=title,overallscore,service,reviewdate&q= :&安培; FQ = ID:315安培;开始= 0&安培;行= 4和;排序= REVIEWDATE%20desc
我想在多值字段上添加分页,但上面的查询会抛出错误can not sort on multivalued field: reviewdate
如何添加分页(或者根据多值字段上的过滤器不同地选择响应的子集)?在我的情况下,页面大小为4,总结果为18,这将导致5页。
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">0</int>
<lst name="params">
<str name="facet">true</str>
<str name="fl">reviewtitle,overallscore,service,reviewdate,rating</str>
<str name="facet.mincount">1</str>
<str name="indent">on</str>
<str name="q">*:*</str>
<str name="fq">id:315</str>
</lst>
</lst>
<result name="response" numFound="1" start="0">
<doc>
<float name="rating">8.78</float>
<arr name="service">
<int>8</int>
<int>10</int>
<int>10</int>
<int>10</int>
<int>5</int>
<int>8</int>
<int>9</int>
<int>10</int>
<int>10</int>
<int>10</int>
<int>10</int>
<int>9</int>
<int>9</int>
<int>9</int>
<int>9</int>
<int>6</int>
<int>1</int>
<int>10</int>
</arr>
<arr name="overallscore">
<int>8</int>
<int>10</int>
<int>10</int>
<int>10</int>
<int>8</int>
<int>8</int>
<int>9</int>
<int>10</int>
<int>9</int>
<int>10</int>
<int>10</int>
<int>9</int>
<int>10</int>
<int>9</int>
<int>9</int>
<int>8</int>
<int>1</int>
<int>10</int>
</arr>
<arr name="reviewdate">
<date>2014-11-26T17:18:50.367Z</date>
<date>2014-10-10T16:54:07.397Z</date>
<date>2014-08-18T14:21:17.807Z</date>
<date>2014-08-17T00:20:41.877Z</date>
<date>2014-08-14T15:30:44.963Z</date>
<date>2014-08-14T15:23:36.29Z</date>
<date>2014-08-13T16:25:38.327Z</date>
<date>2014-08-13T13:54:47.847Z</date>
<date>2014-08-13T13:20:20.753Z</date>
<date>2014-06-16T23:29:37.093Z</date>
<date>2012-11-23T21:54:07.897Z</date>
<date>2012-11-21T17:40:01.11Z</date>
<date>2012-11-17T01:58:53.15Z</date>
<date>2012-11-14T02:17:30.677Z</date>
<date>2012-11-13T23:22:14.613Z</date>
<date>2012-11-13T19:09:25.563Z</date>
<date>2012-08-01T18:09:33.243Z</date>
<date>2012-07-09T20:37:39.837Z</date>
</arr>
</doc>
</result>
<lst name="facet_counts">
<lst name="facet_queries" />
<lst name="facet_fields" />
<lst name="facet_dates" />
<lst name="facet_ranges" />
</lst>
</response>