Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-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 4036310C85 for ; Wed, 27 Nov 2013 23:26:39 +0000 (UTC) Received: (qmail 79292 invoked by uid 500); 27 Nov 2013 23:26:36 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 79248 invoked by uid 500); 27 Nov 2013 23:26:36 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 79174 invoked by uid 99); 27 Nov 2013 23:26:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Nov 2013 23:26:36 +0000 Date: Wed, 27 Nov 2013 23:26:36 +0000 (UTC) From: "Emmanuel Lecharny (JIRA)" To: dev@directory.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DIRSERVER-1921) Indexes dont work on distinguishedNameMatch attributeType MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DIRSERVER-1921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13834333#comment-13834333 ] Emmanuel Lecharny commented on DIRSERVER-1921: ---------------------------------------------- The perfect JIRA ! Thanks ! I confirm this is a bug. The DnComparator is actually just checking if 2 DNs are equals, instead of telling if one is below or above another one. This leads to some trouble when finding a DN into the BTree : public int compare( Object obj0, Object obj1 ) { Dn dn0 = null; Dn dn1 = null; try { dn0 = getDn( obj0 ); dn1 = getDn( obj1 ); } catch ( LdapException e ) { // -- what do we do here ? return -1; } if ( dn0.equals( dn1 ) ) { return 0; } else { return -1; } } We need to implement a smarter DN comparator, which is a challenge.. > Indexes dont work on distinguishedNameMatch attributeType > --------------------------------------------------------- > > Key: DIRSERVER-1921 > URL: https://issues.apache.org/jira/browse/DIRSERVER-1921 > Project: Directory ApacheDS > Issue Type: Bug > Components: core > Affects Versions: 2.0.0-M15 > Reporter: lucas theisen > Priority: Critical > Labels: patch, test > Attachments: patch.txt > > > When attempting to add an index for an attribute that uses distinguishedNameMatch, items are not found. I will attach a patch for the JdbmIndexTest that demonstrates the issue. -- This message was sent by Atlassian JIRA (v6.1#6144)