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 B7BCD17BD9 for ; Thu, 21 May 2015 12:59:35 +0000 (UTC) Received: (qmail 76916 invoked by uid 500); 21 May 2015 12:59:32 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 76847 invoked by uid 500); 21 May 2015 12:59:32 -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 76832 invoked by uid 99); 21 May 2015 12:59:31 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 May 2015 12:59:31 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 50BD9182865 for ; Thu, 21 May 2015 12:59:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.233 X-Spam-Level: ** X-Spam-Status: No, score=2.233 tagged_above=-999 required=6.31 tests=[SPF_FAIL=0.919, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id LKBCUKSQgVxo for ; Thu, 21 May 2015 12:59:23 +0000 (UTC) Received: from mwork.nabble.com (mwork.nabble.com [162.253.133.43]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTP id 2F16F45498 for ; Thu, 21 May 2015 12:59:23 +0000 (UTC) Received: from mben.nabble.com (unknown [162.253.133.72]) by mwork.nabble.com (Postfix) with ESMTP id 296371F02F37 for ; Thu, 21 May 2015 05:59:50 -0700 (PDT) Date: Thu, 21 May 2015 05:58:52 -0700 (MST) From: alexw To: solr-user@lucene.apache.org Message-ID: <1432213132670-4206817.post@n3.nabble.com> Subject: Price Range Faceting Based on Date Constraints MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I have an unique requirement to facet on product prices based on date constraints, for which I have been thinking for a solution for a couple of days now, but to no avail. The details are as follows: 1. Each product can have multiple prices, each price has a start-date and an end-date. 2. At search time, we need to facet on price ranges ($0 - $5, $5-$20, $20-$50...) 3. When faceting, a date is first determined. It can be either the current system date or a future date (call it date X) 4. For each product, the price to be used for faceting has to meet the following condition: start-date < date X, and date X < end-date, in other words, date X has to fall within start-date and end-date. 5. My Solr version: 3.5 Hopefully I explained the requirement clearly. I have tried single price field with multivalue and each price value has startdate and enddate appended. I also tried one field per price with the field name containing both startdate and enddate. Neither approach seems to work. Can someone please shed some light as to how the index should be designed and what the facet query should look like? Thanks in advance for your help! -- View this message in context: http://lucene.472066.n3.nabble.com/Price-Range-Faceting-Based-on-Date-Constraints-tp4206817.html Sent from the Solr - User mailing list archive at Nabble.com.