Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D9D07107BC for ; Mon, 12 Jan 2015 13:41:19 +0000 (UTC) Received: (qmail 43730 invoked by uid 500); 12 Jan 2015 13:41:19 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 43666 invoked by uid 500); 12 Jan 2015 13:41:19 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 43653 invoked by uid 99); 12 Jan 2015 13:41:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2015 13:41:19 +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 (nike.apache.org: domain of msokolov@safaribooksonline.com designates 209.85.216.171 as permitted sender) Received: from [209.85.216.171] (HELO mail-qc0-f171.google.com) (209.85.216.171) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Jan 2015 13:40:53 +0000 Received: by mail-qc0-f171.google.com with SMTP id r5so18003112qcx.2 for ; Mon, 12 Jan 2015 05:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=safaribooksonline.com; s=google; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=/IK36OqyFhd1jm5he1IndL9GXJqQQ95XfOzk0GoMDfU=; b=FFGEEr8V8NIlsTcIbbgS9ylpswfvUFL1BmlwX+ofC98iZPxInRfBiWPCO9WcugbpiH DJgVGt5ahjKwvIBsjxQ3NiENrAWstkAVIVbx19x9cG1dXTMVTyYZ3SaigKckEWCaZxOG cav3U0klOQzw7BCkolcTgBl3rFOGP/NYx8gDE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=/IK36OqyFhd1jm5he1IndL9GXJqQQ95XfOzk0GoMDfU=; b=m4X+RzjdYuVm28FjYQoFuHh613SQc4MttW35EnVb2jSCrbtgpT8EWFKFZ5n1PnM6a2 ZaPpOeDC/0LeRTkx5JbPaGkrGL2yyPZ10hj/g7P19CuTUti97r1+C9722I8uNO8X/R+x vR5wInl8kDSZxuOQF+kGq8EZ5iJncBYCohpXlIfML6zOGFg7a46mWqwOFDTynWDv99x0 GQpFmbNGv4A5o+ReI4N1CmEVK9hPGcB/+STHQ+0A+C0oq5zSndsznmXgxNZWcARaih4N gRZd0putLmvISyMD6HbrDBaCJZHF1p4fnzEYgeMYii4f4DBA1APYXT6oWMWtKj5Va7af iywA== X-Gm-Message-State: ALoCoQliblCpwCQcmrBwtFo0/+DbeZEzaWE7J6g/Qvua7b3RX+8qWCLKekcXI/0pgquZbgctfXid X-Received: by 10.224.93.6 with SMTP id t6mr49221594qam.93.1421070051525; Mon, 12 Jan 2015 05:40:51 -0800 (PST) Received: from [192.168.1.14] (pool-71-174-254-95.bstnma.fios.verizon.net. [71.174.254.95]) by mx.google.com with ESMTPSA id g20sm14796043qar.17.2015.01.12.05.40.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jan 2015 05:40:50 -0800 (PST) Message-ID: <54B3CEF1.50005@safaribooksonline.com> Date: Mon, 12 Jan 2015 08:41:05 -0500 From: Michael Sokolov User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: AW: howto: handle temporal visibility of a document? References: <3e478281801e4f338c35aabe866f7b9b@Exchange2013.mysigndomain.corp> <2da82c69d348409c98eb08b5e2807ec9@Exchange2013.mysigndomain.corp> In-Reply-To: <2da82c69d348409c98eb08b5e2807ec9@Exchange2013.mysigndomain.corp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org The basic idea seems sound, but I think you can simplify that query a bit. For one thing, the *:* clauses can be removed in a few places: also if you index an explicit null value you won't need them at all; for visiblefrom, if you don't have a from time, use 0, for visibleto, if you don't have a to time, use maxlong. -Mike On 1/12/15 4:23 AM, Clemens Wyss DEV wrote: > I'll add/start with my proposal ;) > > Document-meta fields: > + visiblefrom [long] > + visibleto [long] > > Query or query filter: > (*:* -visiblefrom:[* TO *] AND -visibleto:[* TO *]) > OR (*:* -visiblefrom:[* TO *] AND visibleto:[ TO *]) > OR (*:* -visibleto:[ * TO *] AND visiblefrom:[* TO ]) > OR ( visiblefrom:[* TO ] AND visibleto:[ TO *]) > > -----Ursprüngliche Nachricht----- > Von: Clemens Wyss DEV [mailto:clemensdev@mysign.ch] > Gesendet: Montag, 12. Januar 2015 09:40 > An: java-user@lucene.apache.org > Betreff: howto: handle temporal visibility of a document? > > We have documents that are not always visible (visiblefrom-visibleto). In order to not have to query the originating object of the document whether it is currently visible (after the query), we'd like to put metadata into the documents, so that the visibility can be determined at query-time (by the query itself or a query filter). Any suggestions on how to index and query this metadata? > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org