Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 2.0

Filter view result keys using wildcard

1 reply [Last post]
  • Login or register to post comments
Mon, 05/21/2012 - 12:14
venski
Offline
Joined: 05/21/2012
Groups: None

Is there a way to filter view result keys using wildcards? For example something like "Get all keys that start with 'cid_10_'" -> key="cid_10_*".

Similarly, can I use the key or keys parameters to filter 2-element array keys based on one of the elements of the key? For example if the resulting keys are:

["1", "1"],
["1", "2"],
["1", "3"],
["1", "4"],
["1", "5"],
["2", "1"],
["2", "2"],
["2", "3"],
["2", "4"],
["2", "5"],

with some values, to be able to get all the values that have "1" as the first element of the key or in the above example:
["1", "1"],
["1", "2"],
["1", "3"],
["1", "4"],
["1", "5"],

Top
  • Login or register to post comments
Tue, 05/22/2012 - 04:34
venski
Offline
Joined: 05/21/2012
Groups: None

I think I kind of answered my own questions.

For the first part there are apparently the startkey and endkey parameters, which I had somehow missed.

For the second part instead of using array keys I should just concatenate the 2 elements using something sort of separator and get keys of the type 1::1, 1::2, 2::4, etc. Then I could use the startkey and endkey once again

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker