directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <>
Subject Re: Filtering entries on a custom partition
Date Sat, 30 Apr 2011 11:39:58 GMT
On Fri, Apr 29, 2011 at 4:07 PM, Javier Mendez Vasquez
<> wrote:
> Hi, thanks for your reply.
> Yes, I implemented a custom partition (the interface
> I'm using version is 1.5.5 of Apache DS.
> What do you mean by Backend? Is this how I implement the data store?


> Based on your comments, I need to add more 'ifs' to filter the results? For example:
>        if (!ctx.getFilter().toString().contains("objectClass=person"))
> Then return only the entries I'm interested in?

In principle yes.

But to evaluate if an entry matches an LDAP filter is much more
complex. Filters can be deeply nested combinations of 'and', 'or', and
'not' choices. Beside equality filters there also substring, presence,
lessThanOrQual, etc. matches. The matching rule for a particular
attribute must also be considered (e.g. caseIgnoreMatch or
caseExactMatch). So it's quite hard to implement that with 'ifs'.

So as Kiran mentioned, take a look into the DefaultSearchEngine and
all the Evaluators:

Kind Regards,

View raw message