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

AW: Problem finding telephonenumber in a plain numeric search when number is stored with special characters



I tried to activate an approx index as proposed by Hallvard Furuseth, 
but always got an error message: line 81: approx index of attribute "telephonenumber" disallowed,
even when I tried to combine it with others (pres,eq,sub,...).
Any hints to do this?

For me a simple solution ( just for our site off course) would be to manipulate the SYNTAX in the schema.
Unfortunately I don't have the knowledge about how to do this.
Could you give me a hint?

Currently our core.schema looks like this (v. 2.2.15)
core.schema:
attributetype ( 2.5.4.20 NAME 'telephoneNumber'
        DESC 'RFC2256: Telephone Number'
        EQUALITY telephoneNumberMatch
        SUBSTR telephoneNumberSubstringsMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.50{32} )

Regards,
Walter Kempel

-----Ursprüngliche Nachricht-----
Von: Howard Chu [mailto:hyc@symas.com] 
Gesendet: Samstag, 6. August 2005 10:51
An: Walter Kempel
Cc: OpenLDAP-software@OpenLDAP.org
Betreff: Re: Problem finding telephonenumber in a plain numeric search when number is stored with special characters


Walter Kempel wrote:
> Teleponenumber:+41(61)26-71234
>
> Searchfilter "(telephonenumber=+41(61)26-71234)" gave correct result 
> Searchfilter "(telephonenumber=41612671234)" gave correct result 
> Searchfilter "(telephonenumber=41(61)26-71234)" gave correct result 
> Searchfilter "(telephonenumber=+41(61)2671234)" gave correct result
>
> It seems that Notes keeps all non-digit characters out of the 
> telephonenumber index AND the search.
>
> How can I achieve the same under OpenLdap?
>
Currently you can't. OpenLDAP's telephoneNumber syntax only strips the '-' characters out of the number for indexing. Perhaps you should file an ITS requesting that this be changed; it probably would be more useful to only preserve numeric digits in the index (and the matching).

By the way, technically a number like +41 (61) xxxxx is not well formed; the parentheses are supposed to be omitted for international numbers:

http://groups-beta.google.com/group/comp.std.internat/msg/24fc32228689a620?dmode=source

--
  -- Howard Chu
  Chief Architect, Symas Corp.  http://www.symas.com
  Director, Highland Sun        http://highlandsun.com/hyc
  OpenLDAP Core Team            http://www.openldap.org/project/