Return-Path: X-Original-To: apmail-jackrabbit-dev-archive@www.apache.org Delivered-To: apmail-jackrabbit-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 3EAE3C03F for ; Thu, 9 Aug 2012 08:57:29 +0000 (UTC) Received: (qmail 66970 invoked by uid 500); 9 Aug 2012 08:57:28 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 66635 invoked by uid 500); 9 Aug 2012 08:57:28 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 66480 invoked by uid 99); 9 Aug 2012 08:57:21 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Aug 2012 08:57:21 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 95983142822 for ; Thu, 9 Aug 2012 08:57:20 +0000 (UTC) Date: Thu, 9 Aug 2012 08:57:20 +0000 (UTC) From: "Alex Parvulescu (JIRA)" To: dev@jackrabbit.apache.org Message-ID: <1488214574.723.1344502640614.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1388623782.122181.1343754754688.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Assigned] (JCR-3401) Wrong results when querying with a DescendantSelfAxisQuery MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/JCR-3401?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Alex Parvulescu reassigned JCR-3401: ------------------------------------ Assignee: Alex Parvulescu =20 > Wrong results when querying with a DescendantSelfAxisQuery > ---------------------------------------------------------- > > Key: JCR-3401 > URL: https://issues.apache.org/jira/browse/JCR-3401 > Project: Jackrabbit Content Repository > Issue Type: Bug > Components: jackrabbit-core, query > Affects Versions: 2.3.7, 2.4.2, 2.5 > Reporter: C=C3=A9dric Damioli > Assignee: Alex Parvulescu > Fix For: 2.6 > > Attachments: DescendantSelfAxisQuery.java.patch, SimpleDescendant= SelfAxisTest.java > > > It seems to be caused by the DescendantSelfAxisScorer in the method advan= ce(int target) : > {code} > public int advance(int target) throws IOException { > if (currentDoc =3D=3D NO_MORE_DOCS) { > return currentDoc; > } > // optimize in the case of an advance to finish. > // see https://issues.apache.org/jira/browse/JCR-3082 > if (target =3D=3D NO_MORE_DOCS) { > subScorer.advance(target); > currentDoc =3D NO_MORE_DOCS; > return currentDoc; > } > currentDoc =3D subScorer.nextDoc(); > if (currentDoc =3D=3D NO_MORE_DOCS) { > return NO_MORE_DOCS; > } else { > collectContextHits(); > return isValid(currentDoc) ? currentDoc : nextDoc(); > } > } > {code} > It seems to me that we should have:=20 > {code} > currentDoc =3D subScorer.advance(target)=20 > {code} > instead of:=20 > {code} > currentDoc =3D subScorer.nextDoc(); > {code} > I could provide a patch but I don't know if this is necessary for a singl= e line of code. > Moreover, I don't know if my fix is ok, as I'm not sure to fully understa= nd the whole picture. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira