user1607736
user1607736

Reputation: 1

Find a document with the date-time before current date-time in Solr

in Solr I have documents containing order dates, and I want to find the documents containing past order dates (before current date time).

I am using orderDate:[* TO NOW] query but it excludes the documents containing order date of the same day.

Upvotes: 0

Views: 176

Answers (1)

MatsLindh
MatsLindh

Reputation: 52802

[* TO NOW] should actually work, but will wreck havoc with your caches. Try using [* TO NOW/DAY+1DAY] instead (which should give you midnight of the current day instead, and it won't change each second, so the performance will be far better).

Upvotes: 1

Related Questions