2012-08-18T17:00:00Z 2012-06-...">

Multiple request field in solr

I have a document like this:
  <doc>
<arr name="StartDate">
<date>2012-08-18T17:00:00Z</date>
<date>2012-06-28T17:00:00Z</date>
<date>2013-02-28T17:00:00Z</date>
<date>2012-04-16T17:00:00Z</date>
<date>2012-08-06T17:00:00Z</date>
<date>2012-05-18T17:00:00Z</date>
<date>2012-07-04T17:00:00Z</date>
</arr>
<arr name="EndDate">
<date>2012-09-29T17:00:00Z</date>
<date>2012-06-29T17:00:00Z</date>
<date>2013-04-16T17:00:00Z</date>
<date>2012-05-07T17:00:00Z</date>
<date>2012-08-15T17:00:00Z</date>
<date>2012-06-22T17:00:00Z</date>
<date>2012-08-01T17:00:00Z</date>
</arr>
</doc>

I have a date range and want to find a pair of StartDate and EndDate that span the range. For example, the first pair of startDate and EndDate (2012-08-18 TO 2012-09-29) returns true if the input range (x, y) is 2012-08-18 <x and 2012-09-29> y.

I wrote this query:
StartDate: [1995-12-31T23: 59: 59.999Z TO 2012-08-18T00: 00: 00.000Z] AND EndDate: [2012-09-29T00: 00: 00.000Z K 2099-01-01T00 : 00: 00.000Z]
but the problem is finding the SOLR of all matches in the set of 14 items above, while I just want to compare them one at a time (1 with 1, 2 with 2 ...).

Please tell me how to do this. Many thanks.

+3
source share
1

, , , Solr.

Solr "" , , :

dates: [
  (start1, end1),
  (start2, end2),
  (start3, end3)
]

:

start_date: [ start1, start2, start3 ]
end_date: [ end1, end2, end3 ]

start end , . , Solr, , , Solr, .

Solr id . , .

+2

All Articles