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 4633218B5D for ; Mon, 8 Feb 2016 15:19:45 +0000 (UTC) Received: (qmail 32342 invoked by uid 500); 8 Feb 2016 15:19:44 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 32291 invoked by uid 500); 8 Feb 2016 15:19:44 -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 32279 invoked by uid 99); 8 Feb 2016 15:19:43 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2016 15:19:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 75B451A03BA for ; Mon, 8 Feb 2016 15:19:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 2XntQ35QC9vi for ; Mon, 8 Feb 2016 15:19:42 +0000 (UTC) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 24E4020657 for ; Mon, 8 Feb 2016 15:19:42 +0000 (UTC) Received: by mail-lb0-f179.google.com with SMTP id x4so85839142lbm.0 for ; Mon, 08 Feb 2016 07:19:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=27SCCkYTEqMTCmV8E79RZ1ZD2EXQe1gKRAYy6354zgE=; b=uG7416YWKJJTjCxMcK5Opc3DAJMt5M1GYJjrZRH+gAB5DYNamA7bV2z3jqPrLej/qD 8X6WnP5EUOUw4LOvx9TpuAHqRPgpmVSGlwn4jkgTmmsqzFaB+kpnBImvDAM6JtXY4ZzS Rq0t4Sojxsid3I/ITW23iLguMfQ3BMlqkWqaYiQa0F7yPMiPw0fHHB/23BGRHN2AJFTx w+ed7V2RVa9I/QE9AjmZUOv4IkXPdT2Ols2At+DNIjxX+iO2+kgP5rpzO+DAAeXeUBLv qTcutORbnQz4C3G1vSZ4JjNHo5xYJIu+xiVa/dkBFXtoMfTWMa+/iV3968t6OxJ4jlvY WfjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-type; bh=27SCCkYTEqMTCmV8E79RZ1ZD2EXQe1gKRAYy6354zgE=; b=aLlO73KAutny80LKBrUHZUbFA+OjX3N7EPrgumZS8Z7/87SXshf/uxuQkE9tpZwJZv c0uuZXem+17nIGbLAv+3/6HBGRIjFcrZvIcH4aX8MbjaujCKgF8DsLI8VV4LCsRxc7Zy GnnLFQ5qwZZKqDPFsmvfKWKdXpktXXYxG+JaT9Skwpwl8ug5H2neQwI0IYCqiwMJIR2Q Nf/Uk/YOyhLe1zhyII4M4bWifcF/c5rzGh0H37ZlRAgOfWFDd0PdJvxPZ7ayoGKCObIz SzVS3T04bd1rouzX4QKLMyn5LXUdWLS6+esbFvrwXGCcrKn7nFawLA7WJZZixR9Vm5BF 2T5g== X-Gm-Message-State: AG10YORBNSm/Ei4q7vQ7lnG9u5zqF2gUJ99JDqkXMohBOuzn12GlrvYjlpQ1LbYkZUCKSlaWuG4kjKOiomwhKQ== X-Received: by 10.112.173.164 with SMTP id bl4mr9618470lbc.144.1454944775153; Mon, 08 Feb 2016 07:19:35 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Adrien Grand Date: Mon, 08 Feb 2016 15:19:25 +0000 Message-ID: Subject: Re: Are "position" and "position increment" actually the exact same concept? To: Lucene Users Mailing List Content-Type: multipart/alternative; boundary=001a11c1a43e7db040052b43ba03 --001a11c1a43e7db040052b43ba03 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable This looks like a bug indeed: position increments should be summed up in order to compute positions. Le mar. 2 f=C3=A9vr. 2016 =C3=A0 02:22, Trejkaz a = =C3=A9crit : > I found the following code in PhraseQueryNodeBuilder: > > PhraseQuery.Builder builder =3D new PhraseQuery.Builder(); > List children =3D phraseNode.getChildren(); > if (children !=3D null) { > for (QueryNode child : children) { > TermQuery termQuery =3D (TermQuery) child > .getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID); > FieldQueryNode termNode =3D (FieldQueryNode) child; > > builder.add(termQuery.getTerm(), > termNode.getPositionIncrement()); > } > } > > Note that: > * termNode.getPositionIncrement() returns a "position increment". > * PhraseQuery.Builder.add(Term,int) takes a "position". > > I thought that "position" and "position increment" were two different > things, so I'm confused. Are they actually the same after all? > > TX > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --001a11c1a43e7db040052b43ba03--