Re: Question about multiple fq parameters

2016-06-12 Thread Erick Erickson
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

Re: Question about multiple fq parameters

2016-06-10 Thread Mikhail Khludnev
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 wrote: > Hi Mikhail, > > Can you please explain what this mysterious op parameter is? > How is it relat

Re: Question about multiple fq parameters

2016-06-09 Thread Ahmet Arslan
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 wrote: Shawn, I found "op" at org.apache.solr.schema.DateRangeField.parseSpatialArgs(QParser, S

Re: Question about multiple fq parameters

2016-06-09 Thread Mikhail Khludnev
Steve, It's hard to debug queries in this way. Try to experiment with debugQuery=true, pulling fq to q, just for explanation, etc. On Thu, Jun 9, 2016 at 5:08 PM, Steven White wrote: > Erick, Mikhail, and Shawn, thank you all for your help. > > > > Just a quick re-cap of what I’m trying to achie

Re: Question about multiple fq parameters

2016-06-09 Thread Steven White
Erick, Mikhail, and Shawn, thank you all for your help. Just a quick re-cap of what I’m trying to achieve: my need is to combine 2 or more “fq” queries to be treated as OR. Erick, Mikhail, I have the syntax you provided but I cannot get them to work properly, in fact I’m seeing odd behavior t

Re: Question about multiple fq parameters

2016-06-09 Thread Mikhail Khludnev
Shawn, I found "op" at org.apache.solr.schema.DateRangeField.parseSpatialArgs(QParser, String). On Thu, Jun 9, 2016 at 1:46 AM, Shawn Heisey 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 chec

Re: Question about multiple fq parameters

2016-06-08 Thread Shawn Heisey
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=Inter

Re: Question about multiple fq parameters

2016-06-08 Thread Ahmet Arslan
What is the meaning of 'op=Intersects' here? On Thursday, June 9, 2016 12:20 AM, Mikhail Khludnev wrote: oh.. hold on. you might need the space in the later one ?&q=*&q.op=OR&fq= {!field+f=DateB+op=Intersects v=$b} {!field+f=DateA+op=Intersects v=$a}&b=[2000-01-01+TO+2020-01-01]&a=[2020-01-01

Re: Question about multiple fq parameters

2016-06-08 Thread Mikhail Khludnev
oh.. hold on. you might need the space in the later one ?&q=*&q.op=OR&fq= {!field+f=DateB+op=Intersects v=$b} {!field+f=DateA+op=Intersects v=$a}&b=[2000-01-01+TO+2020-01-01]&a=[2020-01-01+TO+2030-01-01]&... I don't tell you why On Thu, Jun 9, 2016 at 12:17 AM, Mikhail Khludnev < mkhlud...@grid

Re: Question about multiple fq parameters

2016-06-08 Thread Mikhail Khludnev
?&q=*&q.op=OR&fq=filter({!field+f=DateB+op=Intersects}[2000-01-01+TO+2020-01-01]) filter({!field+f=DateA+op=Intersects}[2020-01-01+TO+2030-01-01])&... or ?&q=*&q.op=OR&fq={!field+f=DateB+op=Intersects v=$b} {!field+f=DateA+op=Intersects v=$a}&b=[2000-01-01+TO+2020-01-01]&a=[2020-01-01+TO+2030-01-

Re: Question about multiple fq parameters

2016-06-08 Thread Erick Erickson
Put the whole thing in a single clause, i.e. fq=A OR B. bq: I will have other fq in my query on different field such as ISBN, or the same field as DateA or DateB that will need to be AND'ed with the query This is what Mikhail was telling you. Something like q=A AND B AND C AND D should give the s

Re: Question about multiple fq parameters

2016-06-08 Thread Steven White
Thanks Mikhail. In that case, how do I force an OR for fq on DateA and DateB? And to make things more interesting, I will have other fq in my query on different field such as ISBN, or the same field as DateA or DateB that will need to be AND'ed with the query. Steve On Wed, Jun 8, 2016 at 4:31

Re: Question about multiple fq parameters

2016-06-08 Thread Mikhail Khludnev
C'mon Steve, filters fq=& are always intersected. On Wed, Jun 8, 2016 at 11:28 PM, Steven White wrote: > Hi everyone, > > I cannot make sense of this so I hope someone here can shed some light. > > The following gives me 0 hits (expected): > > ?q=*&q.op=OR&fq={!field+f=DateA+op=Intersects}[202

Question about multiple fq parameters

2016-06-08 Thread Steven White
Hi everyone, I cannot make sense of this so I hope someone here can shed some light. The following gives me 0 hits (expected): ?q=*&q.op=OR&fq={!field+f=DateA+op=Intersects}[2020-01-01+TO+2030-01-01] The following gives me hits (expected): ?q=*&q.op=OR&fq={!field+f=DateB+op=Intersects}[200