couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Behrad Zari <behrad_z...@yahoo.com>
Subject View Efficency
Date Tue, 29 Jun 2010 10:47:29 GMT
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?

--Behrad



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message