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

Search feature in Membase

3 replies [Last post]
  • Login or register to post comments
Tue, 08/16/2011 - 22:50
ashish.sarin
Offline
Joined: 08/16/2011
Groups: None

Hi..

I saw that Spymemcached client library now supports Tap client, which can be used for searching the data stored in Membase. I have serializable Java objects which I store in Membase. Can someone point me to a link or tutorial, which talks about searching for Java objects using Tap client support available in Spymemcahed? or, I can use Tap client only if the objects are of JSON type?

thanks
ashish

Top
  • Login or register to post comments
Wed, 08/17/2011 - 15:52
mikew
Offline
Joined: 03/14/2011
Groups:

I think it would be helpful here for me to first clarify what tap does and then I will answer each of you questions. The addition of tap to memcached (and therefore Membase and Couchbase) arose from the need for people who wanted to know what was happening inside memcached and what kind of data currently resided in memcached. The tap stream allows you to do two things. The first thing you can do is stream all of the data out of memcached, which is called a tap dump. If are using Membase or Couchbase that means you stream all key-value pairs out that reside on memory and on disk. The other thing you can do is stream all key mutations out of memcached. So every time something changes inside of memcached the key-value that changed is stream out of the server through a tap stream.

Can someone point me to a link or tutorial, which talks about searching for Java objects using Tap client support available in Spymemcahed?

You can't search through data with a tap stream. What you could do though is use Couchbase and attach your serialized objects to a document. Then in that document you could have fields that would be searchable through a view.

I can use Tap client only if the objects are of JSON type?

Tap works with any kind of data type.

Let me know if you have any other questions.

Top
  • Login or register to post comments
Thu, 08/18/2011 - 11:03
ashish.sarin
Offline
Joined: 08/16/2011
Groups: None

Hi Mike,

Thanks a lot for explaining Tap client in detail. This does clarify my doubts.

What I'd like to do is to provide search feature to client applications. Does Couchbase provide a RESTful interface (or other means) through which I can perform search on stored data? I'm fine with storing data as JSON documents instead of serialized Java objects.

thanks
ashish

Top
  • Login or register to post comments
Thu, 08/18/2011 - 11:21
mikew
Offline
Joined: 03/14/2011
Groups:

Couchbase Server is a combination of Membase and CouchDB and since CouchDB allows you to create views on JSON documents you gain this same functionality in Couchbase Server. If you are unfamiliar with views they are created by writing simple map reduce functions that allow you to run queries against all of the documents in your database. Couchbase Server is also on the wire compatible with both the memcached (binary and ascii )and CouchDB protocol (Http REST) so any examples you find for CouchDB will work with Couchbase Server. Below are some links to help you get started> Let me know if you have any other questions.

http://wiki.apache.org/couchdb/Introduction_to_CouchDB_views

http://wiki.apache.org/couchdb/HTTP_view_API

http://guide.couchdb.org/draft/views.html

http://guide.couchdb.org/draft/cookbook.html

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