I took a quick look and basically the key is that these are _ranges_ both at index and query time. Each value in the doc is a range of dates.
I _think_ it's something like this. contains = Some date range in the document contains the entire range in the query. within = All date ranges in the doc are entirely within the range of the query intersect = at least one range in the doc has one date in common with the range in the query. Graphically I think it's like this. Docs with two bars are multiValued. *****contains finds doc ------- ---------- query --- doc ------------------ query --------- NOT found doc ----------- ------------- query ------------------- doc ------------- ------------- query -------------- ******within finds doc --------------- ------------ query -------------------------------------- doc ------------ query --------------------- NOT found doc ----------- --------------- query -------------------------- doc ----------------- ----------------- query ---------------- ******intersects doc -------------- query -------- doc -------------- query ------------ doc -------------- query ---- NOT found doc --------------- query ------------ NOTE, this is a little tricky to get your head around since a dateRange field in a doc has implicit lower bounds and upper bounds, i.e. like [1980 TO 1981] is _two_ years, 1980-01-01T00:00:00Z TO 1981-12-31T23:23:59,999 Cool Stuff! Erick On Fri, Jun 10, 2016 at 12:56 AM, Mikhail Khludnev <mkhlud...@griddynamics.com> wrote: > Ahmet, > > Honestly I don't know, but googling gives: > More DateRangeField Details > https://cwiki.apache.org/confluence/display/solr/Working+with+Dates > > On Fri, Jun 10, 2016 at 3:44 AM, Ahmet Arslan <iori...@yahoo.com.invalid> > wrote: > >> Hi Mikhail, >> >> Can you please explain what this mysterious op parameter is? >> How is it related to range queries issued on date fields? >> >> Thanks, >> Ahmet >> >> >> On Thursday, June 9, 2016 11:43 AM, Mikhail Khludnev < >> mkhlud...@griddynamics.com> wrote: >> Shawn, >> I found "op" at >> org.apache.solr.schema.DateRangeField.parseSpatialArgs(QParser, String). >> >> >> On Thu, Jun 9, 2016 at 1:46 AM, Shawn Heisey <apa...@elyograg.org> wrote: >> >> > On 6/8/2016 2:28 PM, Steven White wrote: >> > > >> ?q=*&q.op=OR&fq={!field+f=DateA+op=Intersects}[2020-01-01+TO+2030-01-01] >> > >> > Looking at this and checking the code for the Field query parser, I >> > cannot see how what you have used above is any different than: >> > >> > fq=DateA:[2020-01-01 TO 2030-01-01] >> > >> > The "op=Intersects" parameter that you have included appears to be >> > ignored by the parser code that I examined. >> > >> > If my understanding of the documentation and the code is correct, then >> > you should be able to use this: >> > >> > fq=DateB:[2000-01-01 TO 2020-01-01] OR DateA:[2020-01-01 TO 2030-01-01] >> > >> > In my examples I have changed the URL encoded "+" character back to a >> > regular space. >> > >> > Thanks, >> > Shawn >> > >> > >> >> >> -- >> Sincerely yours >> Mikhail Khludnev >> Principal Engineer, >> Grid Dynamics >> >> <http://www.griddynamics.com> >> <mkhlud...@griddynamics.com >> > >> > > > > -- > Sincerely yours > Mikhail Khludnev > Principal Engineer, > Grid Dynamics > > <http://www.griddynamics.com> > <mkhlud...@griddynamics.com>