[jira] Created: (SOLR-1896) Add a Date Range QParser that makes it trivial to express date range filters resulting from date faceting

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (SOLR-1896) Add a Date Range QParser that makes it trivial to express date range filters resulting from date faceting

JIRA jira@apache.org
Add a Date Range QParser that makes it trivial to express date range filters resulting from date faceting
---------------------------------------------------------------------------------------------------------

                 Key: SOLR-1896
                 URL: https://issues.apache.org/jira/browse/SOLR-1896
             Project: Solr
          Issue Type: Improvement
          Components: search
            Reporter: Hoss Man


It would be handy if there was a QParser designed specifically for ease of use in specifying fq params to filter on date when people want to drill down while doing date faceting.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (SOLR-1896) Add a Date Range QParser that makes it trivial to express date range filters resulting from date faceting

JIRA jira@apache.org

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

Hoss Man commented on SOLR-1896:
--------------------------------

Proposed semantics:

DateRangeQParser (aka: drange) with the following local params:

* v (aka: the value to parse) = the lower bounds of the range
* f  = the field to use
* u = the upper bounds of the range
* g = a gap to add to the lower bound to compute the upper bound (ignored if "u" is set)
* il = boolean indicating if the lower bound should be inclusive
* iu - boolean indicating if the upper bound should be inclusive

"f" and "v" are always mandatory, but if date faceting is enabled, and the field specified by "f" is one of the fields being faceted on, then...
* g defaults to facet.date.gap
* u defaults to facet.date.end if facet.date.hardend=true and facet.date.end < v+g
* "before", "after" and "between" are considered valid values for the v param, and cause v & u to be set appropriately
* il and iu default as needed to correspond to facet.date.include (see SOLR-397)

If the field specified by "f" is not involved in date faceting, then either "u" or "g" are mandatory, and some sensible defaults can be used for il and iu (probably both "true")

Example usage...

Assuming we start with

{noformat}
facet.date=bday & facet.date.start=NOW/YEAR & facet.date.end=NOW/YEAR+1YEAR &facet.date.gap=+1DAY
{noformat}

Then these params would all be legal...

{noformat}
filter on today...
  fq={drange f=bday}NOW/DAY

filter on a specific day...
  fq={drange f=bday}2010-04-28T00:00:00Z

filter on a ten day range starting today
  fq={drange f=bday g=+10DAYS}NOW/DAY

filter on a field (unrelated to the faceting) for an 11 hour and 34 minute range
starting at a specific moment...
  fq={drange f=event g=+11HOURS+34MIN}2010-04-28T03:23:00Z

filter on a field (unrelated to the faceting) for between two specific moments
specified by other params...
  fq={drange f=event u=$upper v=$lower} & lower=2010-03-06T01:57:00Z upper=2010-04-28T03:23:00Z

{noformat}

> Add a Date Range QParser that makes it trivial to express date range filters resulting from date faceting
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-1896
>                 URL: https://issues.apache.org/jira/browse/SOLR-1896
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: Hoss Man
>
> It would be handy if there was a QParser designed specifically for ease of use in specifying fq params to filter on date when people want to drill down while doing date faceting.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-1896) Add a Range QParser that makes it trivial to express range filters resulting from range faceting

JIRA jira@apache.org
In reply to this post by JIRA jira@apache.org

     [ https://issues.apache.org/jira/browse/SOLR-1896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-1896:
---------------------------

        Summary: Add a Range QParser that makes it trivial to express range filters resulting from range faceting  (was: Add a Date Range QParser that makes it trivial to express date range filters resulting from date faceting)
    Description: It would be handy if there was a QParser designed specifically for ease of use in specifying fq params to filter on ranges generated when people want to drill down while doing numeric range faceting.  (was: It would be handy if there was a QParser designed specifically for ease of use in specifying fq params to filter on date when people want to drill down while doing date faceting.)

generalizing issue summary/description to target general "range" faceting as introduced in SOLR-1240

> Add a Range QParser that makes it trivial to express range filters resulting from range faceting
> ------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-1896
>                 URL: https://issues.apache.org/jira/browse/SOLR-1896
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: Hoss Man
>
> It would be handy if there was a QParser designed specifically for ease of use in specifying fq params to filter on ranges generated when people want to drill down while doing numeric range faceting.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]