Re: Filter Query with conditional fields

2018-04-16 Thread Erick Erickson
Be a little careful with NOW in filter queries if you intend to have the cache be effective, see: https://lucidworks.com/2012/02/23/date-math-now-and-filter-queries/ Best, Erick On Mon, Apr 16, 2018 at 2:15 AM, Emir Arnautović wrote: > Hi, > You can probably do something like fq=latestEventDate:

Re: Filter Query with conditional fields

2018-04-16 Thread Emir Arnautović
Hi, You can probably do something like fq=latestEventDate:[$startDate TO $endDate] OR (!latestEventDate:[* TO *] AND dateCreated:[$startDate TO $endDate])&startDate=.,,&endDate=… But it is probably better to merge those two dates at index time to some searchDate field and use that one for searc

Filter Query with conditional fields

2018-04-16 Thread jcondotta
Hi Folks, I've started on Solr World short time ago, I've been working on some filter query changes, the most of question that I've had i could understand, reading this forum, thanks a lot. I've a situation, on my schema there are 2 fields that I've to check: latestEventDate and dateCreated. By d