[ 
https://issues.apache.org/jira/browse/SOLR-397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834597#action_12834597
 ] 

Hoss Man commented on SOLR-397:
-------------------------------

Additional idea that i like much better then the "interval" idea i had a while 
back, transcribed from email so it's not lost to the ages...

I think the semantics that might make the most sense is to add a 
multivalued "facet.date.include" param that supports the following 
options:  all, lower, upper, edge, outer
 - "all" is shorthand for lower,upper,edge,outer and is the default (for back 
compat)
 - if "lower" is specified, then all ranges include their lower bound
 - if "upper" is specified, then all ranges include their upper bound
 - if "edge" is specified, then the first and last ranges include their edge 
bounds (ie: lower for the first one, upper for the last one) even if the 
corrisponding "upper"/"lower" option is not specified.
 - the "between" count is inclusive of each of the start and end bounds iff the 
first and last range are inclusive of them
 - the "before" and "after" ranges are inclusive of their respective bounds if:
 -* "outer" is specified ... OR ...
 -* the first and last ranges don't already include them


so assuming you started with something like (specific dates and durrations 
shortend for readability)...

{{facet.date.start=1 & facet.date.end=3 & facet.date.gap=+1 & 
facet.date.other=all}}

...your ranges would be...

{{[1 TO 2], [2 TO 3] and [* TO 1], [1 TO 3], [3 TO *]}}


The following params would change the ranges in the following ways...

{code}
w/ facet.date.include=lower ...
  [1 TO 2}, [2 TO 3} and [* TO 1}, [1 TO 3}, [3 TO *]

w/facet.date.include=upper ...
  {1 TO 2], {2 TO 3] and [* TO 1], {1 TO 3], {3 TO *]

w/ facet.date.include=lower&facet.date.include=edge ...
  [1 TO 2}, [2 TO 3] and [* TO 1}, [1 TO 3], {3 TO *]

w/ facet.date.include=upper&facet.date.include=edge ...
  [1 TO 2], {2 TO 3] and [* TO 1}, [1 TO 3], {3 TO *]

w/ facet.date.include=upper&facet.date.include=outer ...
  {1 TO 2], {2 TO 3] and [* TO 1], {1 TO 3], [3 TO *]

...etc.
{code}

initial proposal: 
http://old.nabble.com/RE%3A-Date-Facet-duplicate-counts-p27331578.html

> options for dealing with range endpoints in date facets
> -------------------------------------------------------
>
>                 Key: SOLR-397
>                 URL: https://issues.apache.org/jira/browse/SOLR-397
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Hoss Man
>
> Date faceting should support configuration for controlling how edge 
> boundaries are dealt with.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to