Organizational Research By

Surprising Reserch Topic

check solr facet query if it is greater than specific datetime value

I have the following in solr


    2011-11-01 13:40:08.0

    Harsh Snehanshu | Apoorv Jain

now if i want to search for jain, simply i will use this query*%3A*&version=2.2&start=0&rows=10&indent=on&facet=true&fq=person:jain

now the question is: how can i search for entries that have been parsed AFTER (greater than) 2011-11-01 13:00:00 or (between 2011-11-01 12:30:00 and 2011-11-01 13:30:00)??

asked May 16, 2015 in SOLR by rajesh
0 votes

Related Hot Questions

2 Answers

0 votes
The parsed field needs to be defined as a datefield.


schema.xml -

Field type of TrieDateField should be available -

Map the prased field with the tdate field type as -

So, when indexed, the response it would appear as 2009-04-28T00:00:00Z

This would allow you to use date filter queries for the datefield.

e.g. fq=parsed:[1995-12-31T23:59:59.999Z TO 2007-03-06T00:00:00Z]

Also for search it would be better to use q=person:jain.
Use filter queries for restricting the documents rather than searching.
answered May 16, 2015 by rajesh
0 votes

These query parameters should work (not tested and not url escaped)



  • facet.field=parsed enables faceting in the field parsed.
  • f.parsed.facet.range.start/end define the lower and upper bound for that field.
  • Dates should be in ISO 8601 format, but also "date math" expressions like NOW+1YEAR are allowed.
answered May 16, 2015 by rajesh