incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Truemper <truem...@googlemail.com>
Subject Re: View Efficency
Date Tue, 29 Jun 2010 11:22:33 GMT
Hi,

> Dear Couchee's,
> Consider a search page which has N search keys on a specific doc type and we 
> should support OR-logic permutations of these search keys based on user input!
> To support these we should write Views which index these N keys like: 
> emit( [key1, key2,...], null )
> but since view keys are ordered we can't search with this query: 
> key2==value2 || key4==value4
> 
> For this to happen, we may write a view for each permutation! (multi-view 
> technique)
> OR
> emit keys like this:
> 
> emit( [first, key1, key2,...], null )
> emit( [second, key2, ...], null )
> 
> Then we have a single large view.
> 
> 
> My question is: 
> 1) Which solution is more query-effective with regards to data retrieval?
> 2) Is there any other way to support advanced-runtime searches through permanent 
> views?
You should try couchdb-lucene (http://github.com/rnewson/couchdb-lucene). I think you are
looking for a fulltext index. CouchDB views are not designed for this.

Daniel


Mime
View raw message