Working with Dates | Apache Solr Reference Guide 6.6
DateRangeField
is almost a drop-in replacement for places where TrieDateField
is used. The only difference is that Solr's XML or SolrJ response formats will expose the stored data as a String instead of a Date. The underlying index data for this field will be a bit larger. Queries that align to units of time a second on up should be faster than TrieDateField, especially if it's in UTC. But the main point of DateRangeField as its name suggests is to allow indexing date ranges. To do that, simply supply strings in the format shown above. It also supports specifying 3 different relational predicates between the indexed data, and the query range: Intersects
(default), Contains
, Within
. You can specify the predicate by querying using the op
local-params parameter like so:
Read full article from Working with Dates | Apache Solr Reference Guide 6.6
No comments:
Post a Comment