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 0660A199B0 for ; Mon, 11 Apr 2016 22:03:33 +0000 (UTC) Received: (qmail 27563 invoked by uid 500); 11 Apr 2016 22:03:29 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 27495 invoked by uid 500); 11 Apr 2016 22:03:29 -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 27483 invoked by uid 99); 11 Apr 2016 22:03:29 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Apr 2016 22:03:29 +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 AE553180222 for ; Mon, 11 Apr 2016 22:03:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.429 X-Spam-Level: * X-Spam-Status: No, score=1.429 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id OayyUFIzwP54 for ; Mon, 11 Apr 2016 22:03:27 +0000 (UTC) Received: from mail-ig0-f193.google.com (mail-ig0-f193.google.com [209.85.213.193]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D3B4A5F255 for ; Mon, 11 Apr 2016 22:03:26 +0000 (UTC) Received: by mail-ig0-f193.google.com with SMTP id qu10so364331igc.1 for ; Mon, 11 Apr 2016 15:03:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=UsB97S1VWg2SAJncXEbKvNYdIqloRyIm+Val9vehzv4=; b=a3dd74bnP29WDDnbsDhFfy/HzX//k5cNXjCNjqYe3Ngtoh3HcpGsYiiZ04Irq/tLih gH5YwMYWoSjmXzLGM+LNxK5CbrPEBnSH0lppcXP4RwMBVs4QN/pzAbCNAJJ+E/6xMoOU y4XQKEM+npyN23dMHH97wGYxFcdbU0Gew4MBI7GA8fCrhS4tqZjPIuM8bdk/miF6Gf4s dzb8RSvzv7Amv/ywC+W+894+WaFbIXfpD627CwH9B+k47znZDozUuEjSMCazSBuBleqK DiMFeDpGCEqfPXeooM7yvwLXDeGdgDOf6Kh/6zpFYmWFa7BjNkl4brWOWfGLoEvui5F9 4nig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=UsB97S1VWg2SAJncXEbKvNYdIqloRyIm+Val9vehzv4=; b=R2tEyjbMYhb5FIkDL6zOcwwsPUpKmwDt7ab/bh35B/b9cOowFldDYVrx8EJs0/JrPE 7LrLebazgYJGrQG3lPOcZadMtLIii8oZohZ/w+OX86DOy8VTZXJGarUscz6SUPu62Wny 5ywh5nmqgTQ1bk6gahIbCB+6L7toZAza/KhahuZWmZmtpifMHrnG5WawUj8TKJkU61kF sG+UPnA2aCkNTKdkyFTZuT5HfkmUysfxIllszDI1ZvwC/xy34ZdQzF72Du7XziOhpXki qE0GNA/i8fdTLRt9f9ObaS/bYx5w5/h9AyXdkxCTDkZlP8KoPLp3gWsFyGBv45lsbRc+ V/LA== X-Gm-Message-State: AOPr4FXXtU4/7H5wwdYUlwHv3doxu0asyKbWe6MsyxJdbS6lUdnKl7hrtjH29fjCY3LgqttxkPmg0DX/mPvaBg== MIME-Version: 1.0 X-Received: by 10.50.101.169 with SMTP id fh9mr8398650igb.58.1460412204536; Mon, 11 Apr 2016 15:03:24 -0700 (PDT) Received: by 10.107.131.93 with HTTP; Mon, 11 Apr 2016 15:03:24 -0700 (PDT) Date: Mon, 11 Apr 2016 18:03:24 -0400 Message-ID: Subject: Indexing date data for facet search From: Steven White To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=089e0102f00ead613e05303cb63c --089e0102f00ead613e05303cb63c Content-Type: text/plain; charset=UTF-8 Hi everyone, I need to index data data into Solr and then use this field for facet search. My question is this, the date data in my DB is stored in the following format "2016-03-29 15:54:35.461": 1) What format I should be indexing this date + time stamp into Solr? 2) What Solr field type I should be using? Is it "date"? 3) How do I handle various time zones and locales? 4) Can I insert multi value data data into the single "date" facet field and still use this field for facet search? 5) Based on my need, will all the Date Math per [1] on date facet still work? I'm confused here because of my need for (3). To elaborate on (4) some more. The need here is this. In my DB, there are more than one column with date data. I will be indexing them all into this single multi-value Solr field of type Date that I will then use for facet. Is this possible? I guess, this is a two part question, for date facet: a) how to properly index, and b) how do I properly search. As always, any insight is greatly appreciated. Steve [1] https://cwiki.apache.org/confluence/display/solr/Working+with+Dates --089e0102f00ead613e05303cb63c--