Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 69841 invoked from network); 3 Aug 2008 19:10:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2008 19:10:41 -0000 Received: (qmail 9126 invoked by uid 500); 3 Aug 2008 19:10:34 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 9078 invoked by uid 500); 3 Aug 2008 19:10:34 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 9069 invoked by uid 99); 3 Aug 2008 19:10:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2008 12:10:34 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Aug 2008 19:09:47 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 44C5D234C18C for ; Sun, 3 Aug 2008 12:09:44 -0700 (PDT) Message-ID: <725757543.1217790584280.JavaMail.jira@brutus> Date: Sun, 3 Aug 2008 12:09:44 -0700 (PDT) From: "Michael Busch (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Updated: (LUCENE-1327) TermSpans skipTo() doesn't always move forwards In-Reply-To: <1088135891.1215345751670.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Busch updated LUCENE-1327: ---------------------------------- Fix Version/s: (was: 2.3.1) (was: 3.0) (was: 2.9) (was: 2.3) (was: 2.2) (was: 2.1) (was: 2.0.0) (was: 1.9) > TermSpans skipTo() doesn't always move forwards > ----------------------------------------------- > > Key: LUCENE-1327 > URL: https://issues.apache.org/jira/browse/LUCENE-1327 > Project: Lucene - Java > Issue Type: Bug > Components: Query/Scoring, Search > Affects Versions: 1.9, 2.0.0, 2.1, 2.2, 2.3, 2.3.1, 2.3.2, 2.4, 2.9, 3.0 > Reporter: Moti Nisenson > Fix For: 2.3.2, 2.4 > > > In TermSpans (or the anonymous Spans class returned by SpansTermQuery, depending on the version), the skipTo() method is improperly implemented if the target doc is less than or equal to the current doc: > public boolean skipTo(int target) throws IOException { > // are we already at the correct position? > if (doc >= target) { > return true; > } > ... > This violates the correct behavior (as described in the Spans interface documentation), that skipTo() should always move forwards, in other words the correct implementation would be: > if (doc >= target) { > return next(); > } > This bug causes particular problems if one wants to use the payloads feature - this is because if one loads a payload, then performs a skipTo() to the same document, then tries to load the "next" payload, the spans hasn't changed position and it attempts to load the same payload again (which is an error). -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org