Friday, January 29, 2010

Best way to handle ?ReadViewEntries for Lookup

?ReadViewEntries allows a view to be represented purely as XML.
Think about the a view contain more that 10k documents, it will be difficult to get the return value in for the use of Ajax DbLookup. This will sometime return you only specific values not all the values as you expect if you give the "count" parameter as well. As a work around rather than using the &Count parameters use, get the value you need to lookup and pass "&StartKey=valuetolookup&StartType=text", this will result you a faster search with only needed value(s).

The other optional parameters for the ?ReadViewEntries are

Collapse=n

CollapseView

Count=n

Expand=n

ExpandView

KeyType=text|time

ResortAscending=column number

ResortDecending=column number

RestrictToCategory=category

Start=n

StartKey=string

UntilKey=string

No comments: