I have filed a bug report[1] and working on the fix [1] https://issues.apache.org/jira/browse/DIRSERVER-1976
On Tue, May 6, 2014 at 1:36 AM, Gabriel Albano <[email protected]>wrote: > I am having a similar problem. Search before adding the index: > > #!SEARCH REQUEST (161) OK > #!CONNECTION ldap://stage-ds.pilixo.com:10389 > #!DATE 2014-05-05T19:59:01.677 > # LDAP URL : ldap:// > > stage-ds.pilixo.com:10389/ou=organizations,dc=pilixo?*?sub?(displayName=gabriel*) > # command line : ldapsearch -H ldap://stage-ds.pilixo.com:10389 -x -D > "uid=admin,ou=system" -W -b "ou=organizations,dc=pilixo" -s sub -a always > -z 100000 "(displayName=gabriel*)" "*" > # baseObject : ou=organizations,dc=pilixo > # scope : wholeSubtree (2) > # derefAliases : derefAlways (3) > # sizeLimit : 100000 > # timeLimit : 0 > # typesOnly : False > # filter : (displayName=gabriel*) > # attributes : * > > #!SEARCH RESULT DONE (161) OK > #!CONNECTION ldap://stage-ds.pilixo.com:10389 > #!DATE 2014-05-05T19:59:01.825 > # numEntries : 2 > > > Added index: > > dn: > ads-indexAttributeId=displayName,ou=indexes,ads-partitionId=pilixo,ou=pa > rtitions,ads-directoryServiceId=default,ou=config > objectclass: top > objectclass: ads-jdbmIndex > objectclass: ads-base > objectclass: ads-index > ads-indexattributeid: displayName > ads-indexhasreverse: FALSE > ads-enabled: TRUE > > > Restarted Server and searched again: > > #!SEARCH REQUEST (173) OK > #!CONNECTION ldap://stage-ds.pilixo.com:10389 > #!DATE 2014-05-05T20:02:16.850 > # LDAP URL : ldap:// > > stage-ds.pilixo.com:10389/ou=organizations,dc=pilixo?*?sub?(displayName=gabriel*) > # command line : ldapsearch -H ldap://stage-ds.pilixo.com:10389 -x -D > "uid=admin,ou=system" -W -b "ou=organizations,dc=pilixo" -s sub -a always > -z 100000 "(displayName=gabriel*)" "*" > # baseObject : ou=organizations,dc=pilixo > # scope : wholeSubtree (2) > # derefAliases : derefAlways (3) > # sizeLimit : 100000 > # timeLimit : 0 > # typesOnly : False > # filter : (displayName=gabriel*) > # attributes : * > > #!SEARCH RESULT DONE (173) OK > #!CONNECTION ldap://stage-ds.pilixo.com:10389 > #!DATE 2014-05-05T20:02:16.985 > # numEntries : 0 > > Running 2.0.0-M16, no errors in log as far as I can tell. Furthermore, if > I modify existing or add new entries, they get picked up by the new index, > but existing entries are not. > > Thanks, > Gabriel > > > > On Wed, Apr 23, 2014 at 3:09 AM, Kiran Ayyagari <[email protected] > >wrote: > > > On Wed, Apr 23, 2014 at 12:29 PM, Chris Betts <[email protected]> wrote: > > > > > Hi Kirin, > > > > > > I get exactly the same behaviour with the 'cn' attribute, so I > > > suspect the problem is something to do with creating the indexes after > > the > > > partition has been created rather than the attribute. > > > > > > Curiously, using the same data I successfully created a directory > > > with working indices on an AWS linux image, but in that case I created > > the > > > indices at the same time I created the partition. > > > > > > Here's my current 'not working' config from my laptop (OSX / java > 6 / > > > apacheds 2) which returns 0 entries when searching for (cn=*): > > > > > you need to restart the server after adding the new index/indices in > > configuration. > > Can you try the search after restarting? note that server may take a > while > > to start due to indexing the data > > (btw, configuration is looking good) > > > > otoh, this is strange, the search shouldn't get impacted before restart, > > what version of the server are you using? > > > > > > > > #!SEARCH REQUEST (146) OK > > > > > > #!CONNECTION ldap://localhost:10389 > > > > > > #!DATE 2014-04-23T06:43:15.774 > > > > > > # LDAP URL : > > > ldap://localhost:10389/o=groupmind,c=au?objectClass?sub?(cn=*) > > > > > > # command line : ldapsearch -H ldap://localhost:10389 -x -D > > > "uid=admin,ou=system" -W -b "o=groupmind,c=au" -s sub -a always -z 1000 > > > "(cn=*)" "objectClass" > > > > > > # baseObject : o=groupmind,c=au > > > > > > # scope : wholeSubtree (2) > > > > > > # derefAliases : derefAlways (3) > > > > > > # sizeLimit : 1000 > > > > > > # timeLimit : 0 > > > > > > # typesOnly : False > > > > > > # filter : (cn=*) > > > > > > # attributes : objectClass > > > > > > > > > #!SEARCH RESULT DONE (146) OK > > > > > > #!CONNECTION ldap://localhost:10389 > > > > > > #!DATE 2014-04-23T06:43:15.776 > > > > > > # numEntries : 0 > > > > > > > > > ... hope this helps; however since the AWS version is working fine it's > > no > > > longer super-important to solve - I'll try blowing away the partition > and > > > recreating it along with the indexes at the same time, and see if that > > > solves the problem :-). > > > > > sure, but see if restarting the server fixes this problem and let me > know. > > > > > cheers, > > > > > > - Chris > > > > > > > > > ----- > > > *Dr Christopher Betts* > > > Australian Cloud Identity > > > http://cloudidentity.com.au > > > m: 0408 533 456 > > > > > > > > > On 23 April 2014 15:13, Kiran Ayyagari <[email protected]> wrote: > > > > > >> can you share the partition configuration and the schema definition of > > >> the attribute 'groupmindId'? > > >> > > >> > > >> On Wed, Apr 23, 2014 at 5:57 AM, Chris Betts <[email protected]> > wrote: > > >> > > >>> Hi Folks, > > >>> > > >>> I'm trying to migrate a project from openldap to apacheds, and > I've > > >>> hit > > >>> a weird problem with indexing... I suspect I'm doing something wrong, > > and > > >>> I'm hoping someone can help :-). > > >>> > > >>> Basically, I have a DIT with a subtree of entries containing a > > custom > > >>> schema attribute 'groupmindID', which is a case sensitive ID code. > The > > >>> application uses this groupmindID for searching entries. > > >>> > > >>> After importing the schema and starting things up everything > worked, > > >>> but > > >>> it was pretty slow, so I thought I'd index various attributes, which > I > > >>> did > > >>> using the 'Partitions->Configuration' pane, at which point apacheds > > >>> stopped > > >>> finding them at all! > > >>> > > >>> I've replicated the problem in apacheds studio; here's some > output. > > >>> > > >>> #!SEARCH REQUEST (212) OK > > >>> #!CONNECTION ldap://localhost:10389 > > >>> #!DATE 2014-04-23T00:04:42.092 > > >>> # LDAP URL : > > >>> > > >>> > > > ldap://localhost:10389/cn=topics,o=groupmind,c=au?objectClass?sub?(groupmindID=*) > > >>> # command line : ldapsearch -H ldap://localhost:10389 -x -D > > >>> "uid=admin,ou=system" -W -b "cn=topics,o=groupmind,c=au" -s sub -a > > always > > >>> -z 1000 "(groupmindID=*)" "objectClass" > > >>> # baseObject : cn=topics,o=groupmind,c=au > > >>> # scope : wholeSubtree (2) > > >>> # derefAliases : derefAlways (3) > > >>> # sizeLimit : 1000 > > >>> # timeLimit : 0 > > >>> # typesOnly : False > > >>> # filter : (groupmindID=*) > > >>> # attributes : objectClass > > >>> > > >>> #!SEARCH RESULT DONE (212) OK > > >>> #!CONNECTION ldap://localhost:10389 > > >>> #!DATE 2014-04-23T00:04:42.102 > > >>> # numEntries : 0 > > >>> > > >>> *** > > >>> *** Delete index on 'groupmindID' and restart server, rerun test: > > >>> *** > > >>> > > >>> #!SEARCH REQUEST (253) OK > > >>> #!CONNECTION ldap://localhost:10389 > > >>> #!DATE 2014-04-23T00:09:42.999 > > >>> # LDAP URL : > > >>> > > >>> > > > ldap://localhost:10389/cn=topics,o=groupmind,c=au?objectClass?sub?(groupmindID=*) > > >>> # command line : ldapsearch -H ldap://localhost:10389 -x -D > > >>> "uid=admin,ou=system" -W -b "cn=topics,o=groupmind,c=au" -s sub -a > > always > > >>> -z 1000 "(groupmindID=*)" "objectClass" > > >>> # baseObject : cn=topics,o=groupmind,c=au > > >>> # scope : wholeSubtree (2) > > >>> # derefAliases : derefAlways (3) > > >>> # sizeLimit : 1000 > > >>> # timeLimit : 0 > > >>> # typesOnly : False > > >>> # filter : (groupmindID=*) > > >>> # attributes : objectClass > > >>> > > >>> #!SEARCH RESULT DONE (253) OK > > >>> #!CONNECTION ldap://localhost:10389 > > >>> #!DATE 2014-04-23T00:09:46.856 > > >>> # numEntries : 1000 > > >>> > > >>> > > >>> > > >>> ... I've had a play around, and I can get the same behaviour even > from > > >>> 'normal' attributes like 'cn', so I suspect I'm doing something bone > > >>> headed > > >>> with the way I've set the indexes up - apologies if it's obvious, I'm > > >>> very > > >>> new to apacheds and apacheds studio! > > >>> > > >>> cheers, > > >>> > > >>> - Chris > > >>> > > >>> ----- > > >>> *Dr Christopher Betts* > > >>> > > >>> Australian Cloud Identity > > >>> http://cloudidentity.com.au > > >>> m: 0408 533 456 > > >>> > > >> > > >> > > >> > > >> -- > > >> Kiran Ayyagari > > >> http://keydap.com > > >> > > > > > > > > > > > > -- > > Kiran Ayyagari > > http://keydap.com > > > -- Kiran Ayyagari http://keydap.com
