Uploaded image for project: 'Directory ApacheDS'
  1. Directory ApacheDS
  2. DIRSERVER-2371

Inclusion of 'top' objectclass in searches yields no results

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.0.0.AM26
    • None
    • search
    • None
    • Windows

    Description

      Hi, it's been a while since I've posted here and I hope this note finds you all well. 

      We stayed on a very old ApacheDS version (M17) for many years and have finally moved to AM26. 

      Many of our queries for users, groups, etc logically AND objectclasses with the search criteria. We do this to limit the types of entries that are returned in a particular search. For example to find users with CN's starting with 'A' the query would look like this. 

      (&
      (objectClass=top)
      (objectClass=person)
      (objectClass=organizationalPerson)
      (objectClass=inetOrgPerson)
      (cn=A*)
      )

      This query works in M17, but not AM26. 

      If I remove the 'top' value from the query as shown below, it works. I'm assuming because it's abstract. 

      (&
      (objectClass=person)
      (objectClass=organizationalPerson)
      (objectClass=inetOrgPerson)
      (cn=A*)
      )

      We define objectclasses of entry types in a configuration file. So we easily fixed our queries by removing 'top' from the config file. However we have  functions like isUser, isGroup, isEquipment , etc that take an Entry and compare the equality of its objectclass array with values defined in the configuration file. This introduced a breaking change for us - which isn't horrible and we can fix. However, I'm just wondering if it was intentional to return no results when the top objectclass is present in the query?

      Thanks!

      Carlo

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            caccorsi Carlo Accorsi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: