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 9DF9F10092 for ; Tue, 13 Jan 2015 13:03:17 +0000 (UTC) Received: (qmail 81147 invoked by uid 500); 13 Jan 2015 13:03:16 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 81075 invoked by uid 500); 13 Jan 2015 13:03:16 -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 81046 invoked by uid 99); 13 Jan 2015 13:03:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jan 2015 13:03:15 +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.176 as permitted sender) Received: from [209.85.216.176] (HELO mail-qc0-f176.google.com) (209.85.216.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jan 2015 13:02:50 +0000 Received: by mail-qc0-f176.google.com with SMTP id i17so2010458qcy.7 for ; Tue, 13 Jan 2015 05:02:48 -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=sXnvdX9ibFNtRUBt8Nd4Gl32AzaSlA+9Ru0zX31Iv5I=; b=OuPEwsNuhuePDquGmhu2lEku3e0596cxyILykr6/vEL4Sc11I2M7NSuId8wtTqdBzy 4amqmewX5CzLRVlOt/m/xCa8HG1AraR+eMpzTeK6RR23kTZ5tzwTf5aaj5MhkLjRhyeK O6CHMDhwWGQqUBMz/jIUI8VBV5mwZEtTIsnt4= 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=sXnvdX9ibFNtRUBt8Nd4Gl32AzaSlA+9Ru0zX31Iv5I=; b=llJHRrJdXPssfA5816BqwIcDYhG0dizXZ+IZ9rUr11ijWPNV2iqIqF9OSa/PcF8XGV WyfVGGT2RE5Rg2I++SWemcYwIHpZ4rEBfZRwsQLSuZRkqdsLwk8cLwoLD1u6nCmFO2Ei FWCPrYH1eBGjxDGIgrVKpc2ggEp7LLqL8ht3guERZxYH5mgHxNOSgM/NwxttMPx3Gxs3 /1mNrVLW7fmvYoC8Bu4os/lJy0TwwtdnJ+/3+VxIXswyGMMgF74vgMCDIYCL25IFVOje GcLfi/jn2rAFYm+m5L5wMuD5+rD7S4kQpl5QVW74o9+x7A89sUZyuTwJs95SVk7Zn5IH CzTQ== X-Gm-Message-State: ALoCoQnRNK3aU4qlX7MCiR5aJAM6nZAaw7xzWg3PG40LV++PRBcYxgzBORu0LpCh3PyzwIgjPqlR X-Received: by 10.229.117.73 with SMTP id p9mr22493369qcq.28.1421154168545; Tue, 13 Jan 2015 05:02:48 -0800 (PST) Received: from [192.168.1.8] (pool-71-174-254-95.bstnma.fios.verizon.net. [71.174.254.95]) by mx.google.com with ESMTPSA id w94sm17581982qgw.6.2015.01.13.05.02.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jan 2015 05:02:47 -0800 (PST) Message-ID: <54B51772.8090306@safaribooksonline.com> Date: Tue, 13 Jan 2015 08:02:42 -0500 From: Michael Sokolov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: howto: handle temporal visibility of a document? References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 1/13/2015 2:07 AM, Clemens Wyss DEV wrote: > reduced to: > ( ( *:* -visiblefrom:[* TO *] AND -visibleto:[* TO *] ) > OR (-visiblefrom:[* TO *] AND visibleto:[ TO ]) > OR (-visibleto:[ * TO *] AND visiblefrom:[0 TO ]) > OR ( visiblefrom:[0 TO ] AND visibleto:[ TO ]) ) > >> also if you index an explicit null value you won't need them at all > Could it then be reduced to > (-visiblefrom:[* TO *] AND visibleto:[ TO ]) > OR (-visibleto:[ * TO *] AND visiblefrom:[0 TO ]) > OR ( visiblefrom:[0 TO ] AND visibleto:[ TO ]) > ? > Would I gain a lot more speed if I set visiblefrom to 0 and visibleto to . The query would then be: > visiblefrom:[0 TO ] AND visibleto:[ TO ] I don't know how much, but I'm pretty sure you would gain some - you'd need to measure to be sure. > And a rather Solr'y question, nevertheless I ask it here: > I intended to use this very query as query filter (qf), but I guess it doesn't make sense because '' changes at every call ;) You could reduce the granularity and cache for a short period of time? I believe the range query is more efficient with coarser resolution as well, so if you can handle hour- or minute- precision instead of ms, there might be some gain. But all these performance questions are only worth asking in the context of the rest of your application. You might gain 20% (wild guess) on this part of the query, but if it is 1% of the overall workload, it's not worth worrying about. -Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org