Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id B7FB0200C6C for ; Fri, 21 Apr 2017 07:15:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B681B160BB0; Fri, 21 Apr 2017 05:15:36 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0ABAD160B9F for ; Fri, 21 Apr 2017 07:15:35 +0200 (CEST) Received: (qmail 44152 invoked by uid 500); 21 Apr 2017 05:15:34 -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 44140 invoked by uid 99); 21 Apr 2017 05:15:34 -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; Fri, 21 Apr 2017 05:15:34 +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 ABA64181069 for ; Fri, 21 Apr 2017 05:15:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.396 X-Spam-Level: X-Spam-Status: No, score=-2.396 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=trypticon.org Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id emdGxIoLfaJu for ; Fri, 21 Apr 2017 05:15:29 +0000 (UTC) Received: from mail-ua0-f172.google.com (mail-ua0-f172.google.com [209.85.217.172]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id A31355F23E for ; Fri, 21 Apr 2017 05:15:29 +0000 (UTC) Received: by mail-ua0-f172.google.com with SMTP id j59so29081579uad.0 for ; Thu, 20 Apr 2017 22:15:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trypticon.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=irIEt1OcbmKoxp/NBCNZQ2v8YRN0TyLi59n5gsEQx34=; b=lErB25cYrPbbIWJIE/wMiy8ZWarJBAWIlU0pprLwPEASvocm7aIr0g2P70rGh+GJNg sECRIOj74gLRmb2yTiw9RdOndQ1Cj7KqJ6AOQojzVHAfe6r7i2THBZFJb2qWuDPjXn8y qI6m+cFBJ+Ai3t7H4JlkFdNrJ0XBO9zKuBqSFMv3CZD8+HkbLaZvVqff/hviVkB3Gqap jrA1UcUVIUwI7K5T3VW0UboOgOHZNnxzfD4D/FgVDzOUEWd+6HIvYmDb2gh2x74W0/10 8wnHJ4xFG0cXm/zMQXeItXSqyPwOBlSmoOUSNLHOCcFiE22gTlEddRdYLI6SGJ6IGIvH ZNqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=irIEt1OcbmKoxp/NBCNZQ2v8YRN0TyLi59n5gsEQx34=; b=Ml7ASOAUwzGuP0gkLNQwVPccK4u+xY07rF617FfZ8ag4kY/NUp6x9ydqHk9X5WjN01 HQZs5lgCyTfkgHqVcEP8kOB0imR28+tkuILLMSQnYtwNcHAn65o1TBGpL3ZAxwEEKOEL 9c98H49fAI832PhmP1QZY6+aD2rfUX+ARJtGCPOUV+yNCaQP2N6QdlB1lhB/bKbH7DB3 5D3D4/2IbM4MuWZ6bmwB+5Zn4Hip6ZrWroZ4tdmlvAc3yCbg158i837HEpBFg0PqGOXC V+RhVsxZMouhAOrZEO+csz2s7nsNTmwhgd5N/jtR9HkYLmTlyBYrrjGZjXApek1wSFkC fDIw== X-Gm-Message-State: AN3rC/7NxWhPgutE8RvfFW20/TOtb5qeVifAAxSRV3px2kC453savBCr SlOwnsSauUDK0Sis X-Received: by 10.159.52.17 with SMTP id q17mr5911501uab.83.1492751729092; Thu, 20 Apr 2017 22:15:29 -0700 (PDT) Received: from mail-ua0-f177.google.com (mail-ua0-f177.google.com. [209.85.217.177]) by smtp.gmail.com with ESMTPSA id 100sm1131219uak.9.2017.04.20.22.15.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Apr 2017 22:15:28 -0700 (PDT) Received: by mail-ua0-f177.google.com with SMTP id h2so73290325uaa.1 for ; Thu, 20 Apr 2017 22:15:28 -0700 (PDT) X-Received: by 10.31.93.194 with SMTP id r185mr5031734vkb.42.1492751728104; Thu, 20 Apr 2017 22:15:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.82.118 with HTTP; Thu, 20 Apr 2017 22:15:27 -0700 (PDT) In-Reply-To: <4DFD1AC70EACEF46B1D0715FFDEA75EE43E017F6@MBX24.360buyAD.local> References: <4DFD1AC70EACEF46B1D0715FFDEA75EE43E017F6@MBX24.360buyAD.local> From: Trejkaz Date: Fri, 21 Apr 2017 15:15:27 +1000 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: will lucene traverse all segments to search a 'primary key'term or will it stop as soon as it get one? To: Lucene Users Mailing List Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable archived-at: Fri, 21 Apr 2017 05:15:36 -0000 On Fri, Apr 21, 2017 at 1:09 PM, =E9=A9=AC=E5=8F=AF=E9=98=B3 wrote: > Let=E2=80=99s say I have a user info index and user id is the =E2=80=98pr= imary key=E2=80=99. So when I do a userid term search, > will lucene traverse all segments to search a 'primary key'term or will i= t stop as soon as it get one? > > If it is the latter one, will any plan to make it the former way? Thoughts: 1) What happens if you limit the result count to 1 *and* turn scoring off? 2) If that didn't work, a custom collector which terminates on finding a single hit sounds easy enough to write. TX --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org