Thanks Simon, it helped me alot :) Mobashir
> Date: Tue, 7 Aug 2012 10:14:46 +0100 > From: [email protected] > To: [email protected] > Subject: Re: Document filter and sorting > > Hi, > To do the table sort I'd use client side javascript (for example > http://datatables.net (http://datatables.net/)). Depending on the size of > your dataset that might be sufficient to do the filtering, too. > > If you have a really large dataset (e.g. one that can't entirely be sent to > the client) you can make the view keyed by city (you might want to have a key > that's [Country, State, City], since there are cities that have the same > name) and then query the list function (and corresponding view) with > ?key="The City" (or key=["The country", "The state", "The city"] if you go > with a complex key). > > Hope that helps > Simon > > > On Tuesday, 7 August 2012 at 05:40, Mobashir Hasan wrote: > > > > > Hi, > > I'm new to couchdb and have stuck badly, I have a listing page where I > > display the documents that has some specific values.Now what I have to do > > is to filter these document by different user inputs and sorting the > > documents by different columns.I have 6 columns in my documents.Date to, > > Date from, Name, City, State, Country, Zip > > when user inputs city and hit filter so it should display documents of that > > city only.Similarly, when user click on column name "City" it should sort / > > asc / desc. > > Work environment is JavaScript / html only. > > Any help will be highly appreciated. > > Thanks,Mobashir > > > > > >
