简体   繁体   English

如何对具有多个值的字段排序结果集?

[英]How to order a result set by a field with multiple values?

In my SOLR I keep events that repeats themselves. 在我的SOLR中,我会保留重复发生的事件。
So, event A has something a repeat on the 11th 12th and 29th 因此,事件A在11日12日和29日重复
Event b has repeat on the 2nd and 15th 事件b在2日和15日重复
Event c has on the 12th and 29th 事件c在12日和29日进行

I want to fetch the events ordered by their dates, I want it to be ordered by the first date in the collection. 我想获取按日期排序的事件,我希望按集合中第一个日期排序的事件。
Expected result: 预期结果:

Event B  
      A
      C

The schema entry is 模式条目是

 <fieldType name="tdate" class="solr.TrieDateField" omitNorms="true" precisionStep="6" positionIncrementGap="0"/>

 <field name="date_start" type="tdate" indexed="true" stored="true" required="false" multiValued="true"/>

What would bethe URL I would use? 我要使用的URL是什么?

我的解决方案建议将第一个日期复制到一个单独的可排序字段中,而谷歌建议这是唯一简单的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM