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

Indexing and Query Support

8 replies [Last post]
  • Login or register to post comments
Mon, 08/01/2011 - 13:49
edy_at_ssn
Offline
Joined: 08/01/2011
Groups: None

According to http://www.couchbase.org/get/couchbase/2.0.0, the server has new indexing and query support.
I just downloaded the server version and read the java API (spymemcached), I couldn't find how to index my objects' fields or do any query.
Am I looking at wrong place?

PS: The installation on Redhat 5.x is very painless and the web admin portal helps a lot.

Top
  • Login or register to post comments
Mon, 08/01/2011 - 14:26
perry
Offline
Joined: 10/11/2010
Groups:

You're looking in the right place! Once we get you the information you need, it would be nice if you could help us figure out how we could have made it easier for you.

From within the Web UI, you can now select "views" and define a bit of javascript to do the actual querying/indexing.

You will define the views here, and then query them via spymemcached.

We just released the product on Friday, so we're working on building up the documentation as we speak.

Please let me know what else we can do to help.

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, 08/01/2011 - 15:00
edy_at_ssn
Offline
Joined: 08/01/2011
Groups: None

It would be great to have the documentation that tells how to:
- the concept of indexing documents (how fields in json document are indexed)
- the concept of view (maybe the same as couchdb)
- how to access data by the indexes (does it have to be one view per index and we access the view that matches the search criteria/index?). What if I have 50 fields in a document and I want to index them all and my users can search on any of the fields? Do I have to create 50 views?

Thanks.

Top
  • Login or register to post comments
Mon, 08/01/2011 - 15:58
perry
Offline
Joined: 10/11/2010
Groups:

Sounds good Edy, I'll postpone answering those here and work with our team to get the relevant information posted somewhere for all to consume.

Thanks again, let me know if you don't get some adequate answers in the next few days/week.

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, 08/01/2011 - 16:37
perry
Offline
Joined: 10/11/2010
Groups:

Let's start here: http://docs.couchbase.org/couchbase-manual-2.0/couchbase-views.html

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
Tue, 08/02/2011 - 10:41
timliaw
Offline
Joined: 07/30/2011
Groups: None

I just took a look at the spymemcached 2.7 javadoc, it's not immediately clear to me which APIs I could use with the views. Is it in 2.8?

Top
  • Login or register to post comments
Tue, 08/02/2011 - 11:17
edy_at_ssn
Offline
Joined: 08/01/2011
Groups: None

Perry,
Thanks for the doc regarding View.
I have a design question regarding index/query. Supposed I have an object with 50 fields, and total object count is 20 million and I want my users to search on any of the fields and expect the response to come back in milliseconds (I've done this in Lucene), is this something that Couchbase Server can support?

What about transaction, is it supported by Couchbase Server?

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

@timliaw

The apis for view support are in the 2.8 developer preview of Spymemcached. You will want to use the CouchbaseClient class. Let me know if you have any other questions.

Top
  • Login or register to post comments
Tue, 01/17/2012 - 10:04
nate-dog7
Offline
Joined: 01/09/2012
Groups: None

I've been searching for a while and I can't find what I'm looking for... I'm hoping to get some help here. In Javascript I can interact with my Couchbase server with Nodejs and examples like this:

var connection = new require('net').createConnection(11211, 'localhost');
 
connection.addListener("data", function (data)
{
	var buffer = '';
	buffer += data;
	console.log(buffer);
});
 
connection.write("set account7 0 0 19\r\n{'userName':'Nate'}\r\n");
connection.write("get account7\r\n");

This works but I want to be able to get from the server every document with a certain username. For example, I want to ask the server for every document with 'userName' equal to 'Nate'. Can I create view to do this and query it, not from Couches web interface but from JavaScript?

Thanks.

EDIT: The problem was that I was connecting through port 11211 which uses memcache protocol... couchdb commands can be used through port 8091 (or whatever port you use to connect to the web interface).

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