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 58789696B for ; Fri, 24 Jun 2011 09:25:41 +0000 (UTC) Received: (qmail 45895 invoked by uid 500); 24 Jun 2011 09:25:39 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 45732 invoked by uid 500); 24 Jun 2011 09:25:36 -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 45697 invoked by uid 99); 24 Jun 2011 09:25:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2011 09:25:35 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of ian.lea@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2011 09:25:29 +0000 Received: by iyi20 with SMTP id 20so3562799iyi.35 for ; Fri, 24 Jun 2011 02:25:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=juWYyba31jQAoLpGSKXBHt+CVU9pHVfJzLaU2dpAjtU=; b=BXWtdTN+4dV98vonXGYsyZ7evkjrGrJ8vF6V1jRXvZZ7fND49Yq/R+j8kXexIi1pN1 lA0g8Nrj9WW05EQqwe5UF9U46GX+1Z2+XgfAso47aLbhWtXYxKtomShW3qjJRK7/qFBs NgO8z39hr04459EvD2QE2uVRU5NzoLHKRQwaE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=aK51KEqBQSDntH+LWY1rG4H/74hZjUhW/ke+81TeSXWZ5O8Y5NuycVrQsPNT6lHekW e3nfnG2rwE9UGS6646F89v857jIUnbEgBU2VYgQOFLMtyYtDaVjG1a+Ypkvm6qHWpwCc E3CChewzeCLY1FLUn2U4CRO+wgluj6fi4bwPk= Received: by 10.231.120.92 with SMTP id c28mr2648593ibr.46.1308907509088; Fri, 24 Jun 2011 02:25:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.200.131 with HTTP; Fri, 24 Jun 2011 02:24:49 -0700 (PDT) In-Reply-To: <48CF5D43-E75A-4398-9A55-C89ABE0060A7@gmail.com> References: <48CF5D43-E75A-4398-9A55-C89ABE0060A7@gmail.com> From: Ian Lea Date: Fri, 24 Jun 2011 10:24:49 +0100 Message-ID: Subject: Re: Does {Filter}ing is faster than {Query}ing in Lucene? To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Generalisation is risky, particularly wrt performance, but I'd say yes, particularly if you can cache and reuse the filter e.g. with CachingWrapperFilter. See http://wiki.apache.org/lucene-java/FilteringOptions. Not very up to date but I'd expect the conclusions to stand. -- Ian. On Fri, Jun 24, 2011 at 2:20 AM, Denis Bazhenov wrote: > While reading "Lucene in Action 2nd edition" I came across the descriptio= n of Filter classes which are could be used for result filtering in Lucene.= Lucene has a lot of filters repeating Query classes. For example, NumericR= angeQuery and NumericRangeFilter. > > The book says that NRF does exactly the same as NRQ but without document = scoring. Does this means that if I do not need scoring or sort documents by= document field value I should preferFiltering over Querying from performan= ce point of view? > > --- > Denis Bazhenov > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org