Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7643C9B36 for ; Mon, 9 Apr 2012 19:45:23 +0000 (UTC) Received: (qmail 95949 invoked by uid 500); 9 Apr 2012 19:45:22 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 95849 invoked by uid 500); 9 Apr 2012 19:45:22 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 95842 invoked by uid 99); 9 Apr 2012 19:45:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2012 19:45:22 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [74.125.82.176] (HELO mail-we0-f176.google.com) (74.125.82.176) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Apr 2012 19:45:16 +0000 Received: by werc1 with SMTP id c1so3675563wer.35 for ; Mon, 09 Apr 2012 12:44:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding:x-gm-message-state; bh=XoX+/VmgUh3Yd1Vs6WImM+TZ3VfFvAFYNSGOPvFXQSc=; b=N3NFeZ6JNQkEcNfUari0Gcd6bOEaQTXN9j6muvsB6VrhOxIYE4gXre/l6flDSNevpu xVi8RbCOJmpplaII2zU7yPYlOoa8t28Uj0oogBkbsewQYsEXcEkWOJekEchM0LCr0k5M tHxPBkQ/DvG2K2QhatjM+3IBtHDKHdP09s9wveUf0YErD78/Vryle1flEXNOI42rrKPr ZayVMhC0Ie5FfcsjiyKi7It9ZECXtS9hcMo2bfdFBd7CvbiAKe18xmT2/bkL5MEBtqEI jci27woyRA91diveNYxncaXYupDVeo4EQkLZMRlEYvoSmh/GeFbIp7870PNHcxy1+/xG NCSA== Received: by 10.216.135.69 with SMTP id t47mr4522980wei.85.1334000695188; Mon, 09 Apr 2012 12:44:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.199.95 with HTTP; Mon, 9 Apr 2012 12:44:35 -0700 (PDT) From: Michael McCandless Date: Mon, 9 Apr 2012 15:44:35 -0400 Message-ID: Subject: Re: svn commit: r1311373 - in /lucene/dev/branches/lucene3969: lucene/test-framework/src/java/org/apache/lucene/analysis/ modules/analysis/common/src/java/org/apache/lucene/analysis/shingle/ modules/analysis/common/src/test/org/apache/lucene/analysis To: dev@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Gm-Message-State: ALoCoQn132fPoQoQAmquXK7tQansnYan07VDqrC+42hy9727/MURkEifOzZozeTv6peNNioY72D/ On Mon, Apr 9, 2012 at 3:41 PM, Steven A Rowe wrote: > On 4/9/2012 at 3:06 PM, mikemccand@apache.org wrote: >> LUCENE-3969: [...] tenatively add posLen to ShingleFilter >> [...] >> +++ lucene/dev/branches/lucene3969/modules/analysis/common/src/java/org/ >> +++ apache/lucene/analysis/shingle/ShingleFilter.java Mon Apr =A09 =A019= :05:47 2012 >> [...] >> @@ -319,6 +321,8 @@ public final class ShingleFilter extends >> =A0 =A0 =A0 =A0 =A0 =A0noShingleOutput =3D false; >> =A0 =A0 =A0 =A0 =A0} >> =A0 =A0 =A0 =A0 =A0offsetAtt.setOffset(offsetAtt.startOffset(), nextToke= n.offsetAtt.endOffset()); >> + =A0 =A0 =A0 =A0// nocommit is this right!? =A0i'm just guessing... >> + =A0 =A0 =A0 =A0posLenAtt.setPositionLength(builtGramSize); >> =A0 =A0 =A0 =A0 =A0isOutputHere =3D true; >> =A0 =A0 =A0 =A0 =A0gramSize.advance(); >> =A0 =A0 =A0 =A0 =A0tokenAvailable =3D true; > > +1 - looks right to me. > > builtGramSize is the position length of the output shingle - missing posi= tions (e.g. from stop words) are represented as "filler" tokens. OK thanks Steve! This fixed the one failure I was working on at the time := ) I'll remove the nocommit... Mike McCandless http://blog.mikemccandless.com --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org