[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: 'quote-insensitive' search



Rafa writes:
> Is there any way to make 'enhanced searches' that allows not only ignore 
> case, but also quoted characters as vocals, so I can find names that 
> include á, é, ü, etc.? For example, find 'López' searching (sn=lopez).

Sorry, no.  What you can do is to store the unaccented version of
the name invisibly in the directory, as follows:

Put this in slapd.conf:

    # Subtypes of "name" (e.g. "cn" and "ou") with the
    # option ";x-hidden" can be searched for/compared,
    # but are not shown.  See slapd.access(5).
    attributeoptions x-hidden lang-
    access to attr=name;x-hidden by * search

Then store this in the directory:

    ...
    sn: López
    sn;x-hidden: Lopez
    ...

Now the filter (sn=lopez) will match 'sn;x-hidden: Lopez', but thanks to
the 'access' directive above, that value won't be returned from the
search.

-- 
Hallvard