Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 75359 invoked from network); 2 Dec 2010 11:27:43 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 2 Dec 2010 11:27:43 -0000 Received: (qmail 6020 invoked by uid 500); 2 Dec 2010 11:27:41 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 5834 invoked by uid 500); 2 Dec 2010 11:27:40 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 5826 invoked by uid 99); 2 Dec 2010 11:27:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 11:27:40 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.113.200.5] (HELO homiemail-a79.g.dreamhost.com) (208.113.200.5) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 11:27:35 +0000 Received: from homiemail-a79.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a79.g.dreamhost.com (Postfix) with ESMTP id 217487D4064 for ; Thu, 2 Dec 2010 03:27:09 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; q=dns; s=thelastpickle.com; b=qiDE+NKyZU +vJmJFQmlMNvBSYcxBStyG2X5Tv3/LlTdI8aLRJb54jwFq5nAi8/pRbA/2TBbO2t bUnvfQmtl/vqMZXgFWySgKxxEl4VQTN/Art+k3Kf9RBn2F4oGB6sdQKEhDMKN17r huVC2asBxfyKMgx5holfC5r4hX6/2Hx6k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=thelastpickle.com; h=from :mime-version:content-type:subject:date:in-reply-to:to :references:message-id; s=thelastpickle.com; bh=iU+SvxvVQL8pLCKh BsjFqFNzYA4=; b=APkKIFdrZmk/R9hvCkk9QPvMN06nqDChT4OTfeguckTNAATd CfAxS+EwOsAn/yPVxLw1qdWaJqEBr/f7FzqaG+TU8k9SrN9mRHtiXGzfdcTwEZQG /WzdplvvFRthbkSUvWrCQsas3TVqDYI6Ls2QRSauOm9JstBFnDJn/0A7mzk= Received: from [10.0.1.155] (unknown [121.73.157.230]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: aaron@thelastpickle.com) by homiemail-a79.g.dreamhost.com (Postfix) with ESMTPSA id 8AE087D405F for ; Thu, 2 Dec 2010 03:27:08 -0800 (PST) From: aaron morton Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: multipart/alternative; boundary=Apple-Mail-2--550589084 Subject: Re: Data Model Question Date: Fri, 3 Dec 2010 00:27:03 +1300 In-Reply-To: To: user@cassandra.apache.org References: Message-Id: <7ED5F813-B417-4923-B3C0-9E5D0569FDC3@thelastpickle.com> X-Mailer: Apple Mail (2.1082) --Apple-Mail-2--550589084 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Have you considered using Solr / lucene for the search? It has a lot = more search features, and it really good at faceted navigation through a = product catalogue. It sounds like it would be a better fit for this = task.=20 You can build facets for your price ranges, do the product name thing = and filter by some sort product state. Sort it any way you want and = paginate it.=20 Hope that helps. Aaron =20 On 2 Dec 2010, at 08:03, Pablo D. Salgado wrote: > Hello, >=20 > I need to store "products" data (product.name, product.price, = product.state and product.owner) in Cassandra 0.7 rc1.=20 > The problem is that I need to get "products" where product.price > XX = AND product.price < XX AND product.name =3D XXX AND product.state =3D = XXX. Also I need return the products with pagination sorted by one of = their differents fields (product.name, product.price, product.state or = product.owner). This is a for an "advance product search" functionality. > - I know that I can do the WHERE clause with secondary index of = Cassandra 0.7 but I can't make the pagination because I don't know how = to implement the "previuos" functionality for Row Pagination. (I can use = OPP if needed) > - Also I know how to do pagination on columns but I can't do the WHERE = clause with more than two fields because the result may be not sorted by = the correct field. > Do you have any idea how to do the data model to reach this = requirement? >=20 > Thank you in advance, >=20 > Pablo D. Salgado > psalgado@colpix.net > http://www.colpix.net >=20 --Apple-Mail-2--550589084 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Have = you considered using Solr / lucene for the search? It has a lot more = search features, and it really good at faceted navigation through a = product catalogue. It sounds like it would be a better fit for this = task. 

You can build facets for your price = ranges, do the product name thing and filter by some sort product state. = Sort it any way you want and paginate = it. 

Hope that = helps.
Aaron


 
<= div>
On 2 Dec 2010, at 08:03, Pablo D. Salgado wrote:

Hello,

I need to store "products" data (product.name, product.price, = product.state and product.owner) in Cassandra 0.7 rc1.
The problem = is that I need to get "products"  where product.price > XX AND = product.price < XX AND product.name =3D XXX AND product.state = =3D XXX. Also I need return the products with pagination sorted by one = of their differents fields (product.name, product.price, = product.state or product.owner). This is a for an "advance product = search" functionality.
- I know that I can do the WHERE clause with secondary index of = Cassandra 0.7 but I can't make the pagination because I don't know how = to implement the "previuos" functionality for Row Pagination. (I can use = OPP if needed)
- Also I know how to do pagination on columns but I can't do the WHERE = clause with more than two fields because the result may be not sorted by = the correct field.
Do you have any idea how to do the data model to = reach this requirement?

Thank you in advance,

Pablo D. Salgado
psalgado@colpix.net
http://www.colpix.net


= --Apple-Mail-2--550589084--