CBL Roadmap

48 views
Skip to first unread message

Francisco Garcia

unread,
Feb 8, 2014, 8:25:30 AM2/8/14
to mobile-c...@googlegroups.com
I've just seen the N1QL announcement and I am wondering if its a planned feature for CBL. 

It seems to me that it is quite new and not likely to be in the first release, but, could someone confirm if full-text search support will be supported? including asian text support?

I love everything I have seen in CBL, my only rough edge has been trying to overcome the case where I want to aggregate views with many start-end keys. For example, tagging documents and doing a query by multiple tags. Other case is searching the combination of multiple document properties.

My first thought to solve that problem is doing multiple searches by id and doing the intersection of all of them. However that is something that looks like might be doable by N1QL. 

So should we think that type of queries will be supported within a future?

Jens Alfke

unread,
Feb 8, 2014, 3:36:49 PM2/8/14
to mobile-c...@googlegroups.com

On Feb 8, 2014, at 5:25 AM, Francisco Garcia <pub...@francisco-garcia.net> wrote:

> I've just seen the N1QL announcement and I am wondering if its a planned feature for Couchbase Lite.

It's something we'd like to add, but it's way too early to make plans. Right now each team is too busy working on their own deliverables to have time to design how the two would integrate.

> It seems to me that it is quite new and not likely to be in the first release, but, could someone confirm if full-text search support will be supported? including asian text support?

I don't know the details of N1QL, you should send questions like that to the team.
As for Couchbase Lite, the iOS version supports full-text search in beta 2.

> I love everything I have seen in CBL, my only rough edge has been trying to overcome the case where I want to aggregate views with many start-end keys. For example, tagging documents and doing a query by multiple tags. Other case is searching the combination of multiple document properties.

You can search for the union of keys by setting CBLQuery.keys. For example if your view emits tags as keys, you can find all the documents containing any of a set of keys. If you want the intersection (docs containing all of a set of tags), that is harder

Actually, full-text search could work well for that: in the map function generate the text by joining all the tags separated by spaces. Then FTS on that index will find the docs containing all of the tags. (Your search string can also contain operators like OR and NOT; see the wiki page.) The only problem I can think of is that stemming will cause some inexactitude in matching: for instance, a search for "run" could match tags like "runner" or "ran". That might be a good or a bad thing :) but it'd be easy to filter those out of the results.

Another possibility is to do the union search and then programmatically filtering the output to select only the rows that contain all the keys. This might work reasonably well for your data set, though it clearly wouldn't scale to really big ones.

—Jens
Reply all
Reply to author
Forward
0 new messages