Range Queries - How to build primary OR secondary index


I would like to know if the couchbase dev team has recommendations to allow the primary key to handle a range query

For each document, I have a low and high numeric range value. I would like to create an index to allow me to find those documents that have a low and high value that are in the range of a given single query value.

I have seen the availability of spatial indexes. But the logic is a bit different, they deem the 2 points as latitude and longitude and then you provide a bounding box to see if document lat/long are inside the box.

Anybody have ideas on how to find the documents that have both a low and high value that include a given search value.

I do not plan to use N1QL, only secondary indexes


Here is some helpful info.


Where is the best source of information regarding range queries and maybe using spatial indexes to accomplish them?

My reference above was a lose reference, the information is not really that solid.

Maybe some backup confirmation about what methods are available to me in Couchbase regarding either normal secondar indexes or using spatial indexes.

And dialogue would be helpful.



We have a lot of momentum currently around geospatial views and indexing strategies. To help us answer the question better, can you indicate which SDK you are using?




Hello, I am using couchbase 3.0.2 with the clanguage library on x64 linux (centos 6.5x+) (along with dependent PHP and GoLang interfaces to that c-library)