Yes, it maybe cost more client resource for request unused data, it something like the move the memory paging/sorting/filting which isn't be recommended from server to the client
i guess i don't get the essence when and where to use couchdb, i read mostly couchdb official wiki especially view related, although i can define document and impl some map/reduce views, but i still have many question on how to integrate them to my current application, like above scenairo i want to use couchdb's view(which analyze my users behavior) as a datasource to the web page, i don't know whether it's proper, it seems doen't proper with these many questions encountered. maybe you guys can give some suggestion or some resource you think great On Mon, Jun 22, 2009 at 11:01 AM, Nicholas Orr <[email protected]>wrote: > You could use another tool like ExtJS on the client side to filter and sort > results. > I'm using the Ext.grid.GridPanel with a Ext.ux.data.JsonPagingStore. > > However there are things to consider with this particular approach. > The JsonPagingStore retrieves the whole set of data returned from the > view and stores it client side to filter > & sort. > Using start_key & end_key doesn't apply so if your data grows to be like > 2000 records, 2000 records will be loaded by the grid :) > > I won't reach 30 records with what I'm doing so it's fine to have 30 > records > coming down the wire to the client. > > Plus other thing to consider with this approach is it means learning ExtJS > which isn't exactly simple, take a bit of effort ;) > > Nick > > On Sun, Jun 21, 2009 at 12:15 PM, hhsuper <[email protected]> wrote: > > > but if i need to use the view as a datasource to the web page, i need > > change > > to right view to query on every sorting? > > > > On Sun, Jun 21, 2009 at 3:42 AM, Paul Davis <[email protected] > > >wrote: > > > > > On Fri, Jun 19, 2009 at 9:02 PM, hhsuper<[email protected]> wrote: > > > > thanks paul, > > > > > > > > do you mean i need another view to resolve this, the difference > between > > > them > > > > are the key order? > > > > > > > > > > Yeah, if you're wanting to 'resort' a view, the CouchDB way is to > > > create a second view for each 'sort order'. > > > > > > HTH, > > > Paul Davis > > > > > > > i mean i want to group or sort not with start at the first key, could > i > > > > achieve this goal in only view? > > > > > > > > On Sat, Jun 20, 2009 at 8:51 AM, Paul Davis < > > [email protected] > > > >wrote: > > > > > > > >> If you want different key sorting then you'll need to emit different > > > >> keys. The same goes for grouping differently. > > > >> > > > >> Paul Davis > > > >> > > > >> On Fri, Jun 19, 2009 at 8:48 PM, hhsuper<[email protected]> wrote: > > > >> > Hi, my view return structure like this: > > > >> > > > > >> > > > > >> > > > > > > "key":["1","10075","351"],"value":{"count":27420,"score":2085790,"grade":76.06819839533188} > > > >> > > > > >> > > > > >> > the key column refer to userid, dialogid and seesionid, i know i > can > > > >> group > > > >> > with userid or with userid, dialogid, but how can i group with > > > >> > dialogid or dialogid, > > > >> > sessionid? > > > >> > also about the sorting, the default is using all key, how can i > > > sorting > > > >> only > > > >> > with userid or only with dialogid? > > > >> > > > > >> > give some suggestion pls. > > > >> > > > > >> > -- > > > >> > Yours sincerely > > > >> > > > > >> > Jack Su > > > >> > > > > >> > > > > > > > > > > > > > > > > -- > > > > Yours sincerely > > > > > > > > Jack Su > > > > > > > > > > > > > > > -- > > Yours sincerely > > > > Jack Su > > > -- Yours sincerely Jack Su
