[ 
https://issues.apache.org/jira/browse/SOLR-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12512353
 ] 

Ryan McKinley commented on SOLR-258:
------------------------------------

This looks great Hoss.  Thanks!

The facet param interface look reasonable.  Structurally, I would like to see 
'component' based params split into their own file - FacetParams should be 
similar to HighlightParams.  It seems funny to munge the get/set field bit with 
the expanding list of things we may get or set.  If we implement FacetParams as 
an interface (like HighlightParams), the deprecated class 
o.a.s.request.SolrParams could implement FacetParams.

One thing to note on FacetDateOther.get( string ), if you put in an invalid 
string, you will get IllegalArgumentException or NullPointer - not a 400 
response code.  Perhaps somethign like:

  public enum FacetDateOther {
    PRE, POST, INNER, ALL, NONE;
    public String toString() { return super.toString().toLowerCase(); }
    public static FacetDateOther get(String label) {
      try {
        return valueOf(label.toUpperCase());
      }
      catch( Exception ex ) {
        throw new SolrException
          (SolrException.ErrorCode.BAD_REQUEST,
           label +" is not a valid type of 'other' date facet information", ex 
);
      }
    }
  } 

Personally, I like the sound of  "before", "after" and "between" better then 
"pre" "post" "inner".  before/after seem to sit nicely with the other 
parameters 'start' 'end'.


> Date based Facets
> -----------------
>
>                 Key: SOLR-258
>                 URL: https://issues.apache.org/jira/browse/SOLR-258
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>         Attachments: date_facets.patch, date_facets.patch, date_facets.patch, 
> date_facets.patch, date_facets.patch
>
>
> 1) Allow clients to express concepts like...
>     * "give me facet counts per day for every day this month."
>     * "give me facet counts per hour for every hour of today."
>     * "give me facet counts per hour for every hour of a specific day."
>     * "give me facet counts per hour for every hour of a specific day and 
> give me facet counts for the 
>        number of matches before that day, or after that day." 
> 2) Return all data in a way that makes it easy to use to build filter queries 
> on those date ranges.

-- 
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