Question

I issue this facet date url:

 http://10.18.1.85:8080/mcu1fpSE/articleCore/select/?q=*:*&rows=0&indent=true&facet=true&facet.date=PRESENTDATE&facet.date.start=2011-12-01T00:00:00Z&facet.date.end=2012-06-01T23:59:59Z&facet.date.gap=%2B1MONTH

The result is:

  <int name="2011-12-01T00:00:00Z">250</int>
  <int name="2012-01-01T00:00:00Z">8360</int>
  <int name="2012-02-01T00:00:00Z">9032</int>
  <int name="2012-03-01T00:00:00Z">7332</int>
  <int name="2012-04-01T00:00:00Z">9497</int>
  <int name="2012-05-01T00:00:00Z">10210</int>
  <int name="2012-06-01T00:00:00Z">9789</int>

However, when I issue following query in admin ui:

PRESENTDATE:[2011-12-01T00:00:00Z TO 2011-12-31T00:00:00Z]

There's no any doc returned.

Does Solr Facet Date functionality counts wrong?

Was it helpful?

Solution

Tried date faceting in Solr 4.2.1 and it is not returning correct values. It has been deprecated like the wiki says. Instead I tried range faceting and it works fine:

q=*:*&wt=json&rows=0&facet=true&facet.range=PRESENTDATE&facet.range.start=2011-12-01T00:00:00Z&facet.range.end=2012-06-01T23:59:59Z&facet.range.gap=%2B1MONTH

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top