From dev-return-16240-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Thu Mar 01 13:42:49 2007 Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 88977 invoked from network); 1 Mar 2007 13:42:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Mar 2007 13:42:48 -0000 Received: (qmail 4301 invoked by uid 500); 1 Mar 2007 13:42:55 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 4270 invoked by uid 500); 1 Mar 2007 13:42:55 -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 4258 invoked by uid 99); 1 Mar 2007 13:42:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2007 05:42:55 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of marek-apacheds@o2.pl designates 193.17.41.74 as permitted sender) Received: from [193.17.41.74] (HELO poczta.o2.pl) (193.17.41.74) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Mar 2007 05:42:43 -0800 Received: from poczta.o2.pl (mx10.go2.pl [127.0.0.1]) by poczta.o2.pl (Postfix) with ESMTP id 502F55801C for ; Thu, 1 Mar 2007 14:42:21 +0100 (CET) Received: from l209 (virgiliusz.pbpolsoft.com.pl [212.126.11.125]) by poczta.o2.pl (Postfix) with ESMTP for ; Thu, 1 Mar 2007 14:42:21 +0100 (CET) Message-ID: <000901c75c07$6f9d6160$a801010a@l209> From: "marek-apacheds" To: "Apache Directory Developers List" References: <200703010609.l2169TUa022895@wind.enjellic.com> Subject: searching whole subtree Date: Thu, 1 Mar 2007 14:41:18 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-2"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Virus-Checked: Checked by ClamAV on apache.org Hi When I execute the following query with default scope (ONELEVEL_SCOPE) SearchControls controls = new SearchControls(); ctx.search("", "(!(title=Marek))", controls); everything works fine. But when I change scope to SUBTREE_SCOPE I got an exception. SearchControls controls = new SearchControls(); controls.setSearchScope(SearchControls.SUBTREE_SCOPE); ctx.search("", "(!(title=Marek))", controls); javax.naming.NamingException: [LDAP: error code 80 - failed on search operation: Cannot efficiently search the DIB w/o an index on attribute A user index on attribute 2.5.4.12 (title) does not exist! . To allow such searches please contact the directory administrator to create the index or to enable referrals on searches using these attributes to a replica with the required set of indices.]; remaining name '' at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3029) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2931) at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2737) at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1808) at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1731) at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:368) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:338) at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:321) at javax.naming.directory.InitialDirContext.search(InitialDirContext.java:248) at com.acme.ApacheDSITest.testNegationSubtreeScope(ApacheDSITest.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Regards Marek