Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 580F610D5F for ; Sat, 29 Mar 2014 15:24:46 +0000 (UTC) Received: (qmail 88513 invoked by uid 500); 29 Mar 2014 15:24:42 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 88187 invoked by uid 500); 29 Mar 2014 15:24:41 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 88167 invoked by uid 99); 29 Mar 2014 15:24:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Mar 2014 15:24:40 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of erickerickson@gmail.com designates 209.85.128.174 as permitted sender) Received: from [209.85.128.174] (HELO mail-ve0-f174.google.com) (209.85.128.174) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Mar 2014 15:24:35 +0000 Received: by mail-ve0-f174.google.com with SMTP id oz11so6863277veb.33 for ; Sat, 29 Mar 2014 08:24:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=byXvrnk8ZA/WRtIjhjTUJ1+WysfKiT4AkiBSfve+Q20=; b=hsfEw8LP9szTe6lDk+tj48effIkXUSrhI8+rGhfekBnrRTyG/dewgH9MQKLhUcIbQX bwDc6bomAmzwRgpilF5ENvCx00ueB+J6r880f423N8AntEsGnQqxR24bQvsnvlFeyKNr mxS6R4ZXUuqpwGAeIyoQgz/idOI4fo8heCUv98RdpzWQ0e38IRbWHjbTkSFMLIXmAdce oB+dO7K0t1fXS/9TDNIM/b4PTN3zhh1EnKOWn2x0RpAJsTfDaxTBwtuSqyDKpfN9zQIz I09rVZ2B76mn1XaESB4cyK6zrOkrh68yEyHfvGViRW+gZF5IGajhXtk600hiOgdIgUGE TbXw== MIME-Version: 1.0 X-Received: by 10.52.130.225 with SMTP id oh1mr10987652vdb.8.1396106654458; Sat, 29 Mar 2014 08:24:14 -0700 (PDT) Received: by 10.52.69.234 with HTTP; Sat, 29 Mar 2014 08:24:14 -0700 (PDT) In-Reply-To: <533586CA.2070203@officebeacon.com> References: <53350B99.1040501@officebeacon.com> <533586CA.2070203@officebeacon.com> Date: Sat, 29 Mar 2014 11:24:14 -0400 Message-ID: Subject: Re: Product index schema for solr From: Erick Erickson To: solr-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org The usual approach is to de-normalize the tables, so you'd store docs like (all your product data) min_qty, max_qty, price_per_qty So the above example would have 4 documents, then it all "just works" You have to insure that the id () is different for each, and probably store the product ID in a field other than "id" for this reason. Best, Erick On Fri, Mar 28, 2014 at 10:27 AM, Ajay Patel wrote: > > > Hi Solr user & developers. > > i am new in the world of solr search engine. i have a complex product > database structure in postgres. > > Product has many product_quantity_price attrbutes in range > > For e.g Product iD 1 price range is stored in product_quantity_price > table in following manner. > > min_qty max_qty price_per_qty > 1 50 4 > 51 100 3.5 > 101 150 3 > 151 200 2.5 > > the range is not fixed for any product it can be different for different > product. > > now my question is that how can i save this data in solr in optimized > way so that i can create facets on qty and prices. > > Thanks in advance. > Ajay Patel. > > > > > > > > >