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

Filtered searches failing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • pre-1.0
    • pre-1.0
    • ldap
    • None

    Description

      If we are trying to do a search with substring filters, we don't get the expected results :
      (ou=tem) is ok, but (ou=sys) does not return any value.

      The StringTools method getRegexp() does not create a correct regexp, if we have a null final value (which is the case when we have a * at the end of the filter.

      I think that the regexp should be constructed like this :
      init any final
      A null null -> ^A.* [ current : ^A (incorrect) ]
      null A null -> .A. [ current : .*A (incorrect) ]
      null null A -> .*A [ current : .*A (correct) ]
      A B null -> ^A(.B). [ current : ^A(.*B) (incorrect)]
      A null B -> ^A.*B [ current : ^A.*B (correct) ]
      null A B -> (.*A).*B [ current : (.*A).*B (correct) ]
      A B C -> ^A(.*B).*C [ current : ^A(.*B).*C (correct) ]

      Any comment, before I change it ?

      Attachments

        Activity

          People

            Unassigned Unassigned
            elecharny Emmanuel Lécharny
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: