Re: Range Facet queries for date ranges with with non-constant gaps
Thank you. That helped On Tue, Jul 14, 2015 at 5:02 PM, Chris Hostetter wrote: > > : Are there any examples/documentation for IntervalFaceting using dates > that > : I could refer to? > > You just specify the interval set start & end as properly formated date > values. This example shows some range faceting and interval faceting on > the same field of the "bin/solr -e techproducts" example.. > > > http://localhost:8983/solr/techproducts/select?q=*:*&rows=0&facet=true&facet.interval.set=[2006-01-01T00:00:00Z,2007-01-01T00:00:00Z]&&facet.interval.set=[2005-01-01T00:00:00Z,2006-01-01T00:00:00Z]&facet.interval.set=[2005-01-01T00:00:00Z,2007-01-01T00:00:00Z]&facet.interval=manufacturedate_dt&facet.range=manufacturedate_dt&facet.range.start=2005-01-01T00:00:00Z&facet.range.end=2007-01-01T00:00:00Z&facet.range.gap=%2B2MONTHS > > > > -Hoss > http://www.lucidworks.com/ >
Re: Range Facet queries for date ranges with with non-constant gaps
: Are there any examples/documentation for IntervalFaceting using dates that : I could refer to? You just specify the interval set start & end as properly formated date values. This example shows some range faceting and interval faceting on the same field of the "bin/solr -e techproducts" example.. http://localhost:8983/solr/techproducts/select?q=*:*&rows=0&facet=true&facet.interval.set=[2006-01-01T00:00:00Z,2007-01-01T00:00:00Z]&&facet.interval.set=[2005-01-01T00:00:00Z,2006-01-01T00:00:00Z]&facet.interval.set=[2005-01-01T00:00:00Z,2007-01-01T00:00:00Z]&facet.interval=manufacturedate_dt&facet.range=manufacturedate_dt&facet.range.start=2005-01-01T00:00:00Z&facet.range.end=2007-01-01T00:00:00Z&facet.range.gap=%2B2MONTHS -Hoss http://www.lucidworks.com/
Re: Range Facet queries for date ranges with with non-constant gaps
Are there any examples/documentation for IntervalFaceting using dates that I could refer to? On Mon, Jul 13, 2015 at 6:36 PM, Chris Hostetter wrote: > > : Some of the buckets return with a count of ‘0’ in the bucket even though > : the facet.range.min is set to ‘1’. That is not the primary issue > > facet.range.min has never been a supported (or documented) param -- you > are most likeley trying to use "facet.mincount" (which can be specified > per field as a top level f.my_field_name.facet.mincount, or as a > localparam, ex: facet.range={!facet.mincount=1}my_field_name > > : though. What I would like to get back are buckets of unevenly spaced > : gaps. For example, counts for the last 7 days, last 30 days, last 90 > : days. > > what you are describing is exactly what the "Interval Faceting" feature > provides... > > > https://cwiki.apache.org/confluence/display/solr/Faceting#Faceting-IntervalFaceting > > > -Hoss > http://www.lucidworks.com/
Re: Range Facet queries for date ranges with with non-constant gaps
: Some of the buckets return with a count of ‘0’ in the bucket even though : the facet.range.min is set to ‘1’. That is not the primary issue facet.range.min has never been a supported (or documented) param -- you are most likeley trying to use "facet.mincount" (which can be specified per field as a top level f.my_field_name.facet.mincount, or as a localparam, ex: facet.range={!facet.mincount=1}my_field_name : though. What I would like to get back are buckets of unevenly spaced : gaps. For example, counts for the last 7 days, last 30 days, last 90 : days. what you are describing is exactly what the "Interval Faceting" feature provides... https://cwiki.apache.org/confluence/display/solr/Faceting#Faceting-IntervalFaceting -Hoss http://www.lucidworks.com/
RE: Range Facet queries for date ranges with with non-constant gaps
Try facet.mincount=1. It will still apply to range facets. -Original Message- From: JoeSmith [mailto:fidw...@gmail.com] Sent: Monday, July 13, 2015 5:56 PM To: solr-user Subject: Range Facet queries for date ranges with with non-constant gaps I am trying to do a range facet query for on date ranges. The query below executes and returns results (almost) as desired for 60DAY buckets. http://localhost:8983/solr/mykeyspace2.user_data/select?wt=json&fq:id=7465033&q=*:*&rows=0&indent=true&facet=on&facet.range=login_event&facet.range.gap=%2B60DAY&facet.range.start=NOW/YEAR&facet.range.end=NOW/MONTH%2B1MONTH&facet.range.min=1 Some of the buckets return with a count of ‘0’ in the bucket even though the facet.range.min is set to ‘1’. That is not the primary issue though. What I would like to get back are buckets of unevenly spaced gaps. For example, counts for the last 7 days, last 30 days, last 90 days. What would be the best way to accomplish this?And is there something wrong with facet.range.min usage? * This e-mail may contain confidential or privileged information. If you are not the intended recipient, please notify the sender immediately and then delete it. TIAA-CREF *