[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: multi-value attribute search result
Zhang Weiwu wrote:
> On Sun, 2007-06-24 at 15:54 +0200, Pierangelo Masarati wrote:
>> Piotr Wadas wrote:
>>> Hello,
>>> using openldap 2.3.35.
>>>
>>> When I do a search for some attribute like "cn=foobar", and in set of
>>> attributes which are to be returned per-entry is "cn" attribute, all its
>>> values are returned.
>>>
>>> however, when I search with "cn=foo*", and entry has multiple
>>> "cn" values, like
>>>
>>> "cn=foo",
>>> "cn=joe",
>>> "cn=foobar",
>>> "cn=foobarX",
>>> "cn=bob",
>>> "cn=nofoobar"
>>>
>>> - is it possible to have "cn" returned, but only these values,
>>> which actually matched the filter ?
>> Yes. Use RFC 3876 control. E.g.
>>
>> $ ldapsearch -E mv="(cn=foo*)"
>
> Cool, only this is not mentioned in ldapsearch man page.
Please file an ITS for this. Complaining in the last of a series of
emails on a partially related subject is really the best way for not
seeing it fixed ever.
> My story is like Piotr Wadas but I do have too many values for an
> attribute in different language versions, is it possible to only return
> values in the language version I specified?
> cn=Wong Penghui
> cn;lang-zh=Wang Penghui
> cn;lang-de=...
>
> Now search for cn=*Penghui and wish to only return result in certain
> language, is it possible?
I don't know, but I guess so. Why don't you just try using a filter
like -E mv="(cn;lang-zh=Wang Penghui)" ?
p.
Ing. Pierangelo Masarati
OpenLDAP Core Team
SysNet s.r.l.
via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
---------------------------------------
Office: +39 02 23998309
Mobile: +39 333 4963172
Email: pierangelo.masarati@sys-net.it
---------------------------------------