couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ronny Pfannschmidt (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-1498) range_prefix view parameter to ease working with ranges
Date Mon, 18 Jun 2012 14:59:43 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-1498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13395941#comment-13395941
] 

Ronny Pfannschmidt commented on COUCHDB-1498:
---------------------------------------------

a first example would be finding ddocs 

current way startkey="_design/" endkey= "_desigm"  or "design/\u9999" 
rage way would be range_prefix="design/"

another examples would be something like get articles of a month/year

current way startkey=[year, month] endkey=[year, month, {}]
range way would be range_prefix=[year, month]


last example would be multiple string parts

if one had with various values foremit(['something', 'another'], null)

and would like to get anything that "starts with" ["something", "anot"]

current way startkey=["something", "anot"], endkey=["something", "anotZZZ"]
range way would be range_prefix=["something", "anot"]

as a sidenote, it seems that this kind of prefix handling makes only sense for strings, arrays,
and last strings of an array


                
> range_prefix view parameter to ease working with ranges
> -------------------------------------------------------
>
>                 Key: COUCHDB-1498
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1498
>             Project: CouchDB
>          Issue Type: Bug
>          Components: View Server Support
>            Reporter: Ronny Pfannschmidt
>
> queries for certain ranges are a common operation,
> but we are usually left with figuring what kind of start/end key combination to use if
we want a certain range
> it would be really pleasant if instead of constructing a start/end range from a prefix
by guessing mostly how to construct the end param,
> we could just pass the range prefix as a string/array to the view

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message