Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Membase | Membase Server 1.6.x

How to delete multiple keys which match a regex

2 replies [Last post]
  • Login or register to post comments
Sat, 10/23/2010 - 20:25
groupsense
Offline
Joined: 10/23/2010
Groups: None

In my php script I want to delete all membase keys which match the regex search-*

The use case is:

1. I have a type ahead search

2. everytime a keyboard charecter is pressed in the search box I send the query to the sql server which returns the result and the results are also saved in membase with the key "search-md5(sql)"

3. When a new node is created I want to cleanup all keys saved as search-*

4. So that the new node can show up in the search results immediately.

My current solution is to flush the membase but this is negatively impacting performance.

Thanks,

Vikas

http://www.groupsense.com

 

Top
  • Login or register to post comments
Mon, 10/25/2010 - 10:13
perry
Offline
Joined: 10/11/2010
Groups:

 Thanks Vikas.

 

There's no out-of-the-box functionality to do this today, but the underlying infrastructure is there.  We will be building up this functionality over the next few releases.

 

Today you can use the TAP interface: http://wiki.membase.org/display/membase/TAP+Protocol to iterate over the entire key space and then use that to trigger deletes based upon matching a regular expression.  

 

Doesn't quite do exactly what you wanted, but sounds like it should get you about halfway there.

 

Perry

__________________

Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!

Top
  • Login or register to post comments
Mon, 10/25/2010 - 12:10
groupsense
Offline
Joined: 10/23/2010
Groups: None

How does this function work:

http://code.google.com/appengine/docs/python/memcache/clientclass.html#C...

Seems like memcache server does expose this ?

Vikas

Groupsense - Social way to get things done

 

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