lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Polívka <polivka.pa...@gmail.com>
Subject Re: facet by update date
Date Sun, 24 Jan 2016 21:09:15 GMT
Hi,
We are doing this via interval facet:

Something like this:
facet=on&
facet.interval=update_date&
facet.interval.set=[NOW-1DAY,NOW]&
facet.interval.set=[NOW-3DAY,NOW-1DAY)&
facet.interval.set=[NOW-7DAY,NOW-3DAY)&
facet.interval.set=[NOW-1MONTH,NOW-7DAY)&
facet.interval.set=[NOW-1YEAR,NOW-1MONTH)

I do not know if this is a correct way of doing this, but I did not find
anything better.
Here is link for interval faceting in wiki:
https://cwiki.apache.org/confluence/display/solr/Faceting#Faceting-IntervalFaceting

Hope this helps.

Pavel


ne 24. 1. 2016 v 17:20 odesílatel Jay Potharaju <jspotharaju@gmail.com>
napsal:

> Hi,
> I am trying to calculate facet for update_date of the document. And would
> like to get the following values
> -  < 24 Hrs
> -  < 3 days
> - < 1 week
> - < 1 month
> - < 6 months
> - <1 year
>
> <field name="update_date" type="tdate" indexed="true" stored="true"
> required="true" multiValued="false" docValues="true"/>
>
> The above facet values should change every time someone queries, therefore
> a document that was updated today will show will be in the facet  "24 hrs"
> and when the same query runs 2 weeks from today, the document will be
> marked as "< 1 month".
>
> How can I  set my facets to get the above values?
>
> --
> Thanks
> Jay
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message