Dear list
I am not sure if this is the right place to ask for this, but can someone help me by writing me a patch to openldap that allow me to do search and only getting entries that mathches in default language (but not in other language versions)?
How much do I need to pay for such a patch?
e.g. there are 2 entries:
First Entry is:
o: Company A
Second Entry is:
o: Company B o;lang-de: Aaaa
Then the patch I need would allow me to do a search for o with "*A" that only return me the first entry but do not return the second entry.
I suspect maybe the patch would accept a special search filter format: search for o=*A -> return both entry, this is like traditional search for o;lang-=*A -> return only first entry, this is using the "special search filter format"
The later search filter is only my imagination, I mean ";lang-" is telling server only look for the default language version. There can be better ways to invent search filter format for my purpose without breaking other standards too much.
Thank you very much and best regards
Zhang Weiwu
On 7/14/07, Zhang Weiwu zhangweiwu@realss.com wrote:
Dear list
I am not sure if this is the right place to ask for this, but can someone help me by writing me a patch to openldap that allow me to do search and only getting entries that mathches in default language (but not in other language versions)?
How much do I need to pay for such a patch?
e.g. there are 2 entries:
First Entry is:
o: Company A
Second Entry is:
o: Company B o;lang-de: Aaaa
Then the patch I need would allow me to do a search for o with "*A" that only return me the first entry but do not return the second entry.
I suspect maybe the patch would accept a special search filter format: search for o=*A -> return both entry, this is like traditional search for o;lang-=*A -> return only first entry, this is using the "special search filter format"
The later search filter is only my imagination, I mean ";lang-" is telling server only look for the default language version. There can be better ways to invent search filter format for my purpose without breaking other standards too much.
Thank you very much and best regards
Can't you just do a search like: (&(o=*A*)(lang=foo)) ? Where do these lang- attributes come from? (it seems like you want to search for attributes instead of values, which seems to be the wrong-way around)
On Sun, 2007-07-15 at 21:01 -0400, matthew sporleder wrote:
On 7/14/07, Zhang Weiwu zhangweiwu@realss.com wrote:
Dear list
I am not sure if this is the right place to ask for this, but can someone help me by writing me a patch to openldap that allow me to do search and only getting entries that mathches in default language (but not in other language versions)?
How much do I need to pay for such a patch?
e.g. there are 2 entries:
First Entry is:
o: Company A
Second Entry is:
o: Company B o;lang-de: Aaaa
Then the patch I need would allow me to do a search for o with "*A" that only return me the first entry but do not return the second entry.
I suspect maybe the patch would accept a special search filter format: search for o=*A -> return both entry, this is like traditional search for o;lang-=*A -> return only first entry, this is using the "special search filter format"
The later search filter is only my imagination, I mean ";lang-" is telling server only look for the default language version. There can be better ways to invent search filter format for my purpose without breaking other standards too much.
Thank you very much and best regards
Can't you just do a search like: (&(o=*A*)(lang=foo)) ? Where do these lang- attributes come from? (it seems like you want to search for attributes instead of values, which seems to be the wrong-way around)
May I ask where is the attribute "lang" defined?
In my system there is no "lang" attribute and I was confirmed by another list (general LDAP discussion list) some months ago that in current LDAP it's impossible to search only within "default language" (no modifier in attribute descriptor). Hence I ask for a patch because readily available solution in my knowledge doesn't exist.
Zhang Weiwu zhangweiwu@realss.com writes:
Dear list
I am not sure if this is the right place to ask for this, but can someone help me by writing me a patch to openldap that allow me to do search and only getting entries that mathches in default language (but not in other language versions)?
How much do I need to pay for such a patch?
e.g. there are 2 entries:
First Entry is:
o: Company A
Second Entry is:
o: Company B o;lang-de: Aaaa
Then the patch I need would allow me to do a search for o with "*A" that only return me the first entry but do not return the second entry.
This would violate rfc 3866
I suspect maybe the patch would accept a special search filter format: search for o=*A -> return both entry, this is like traditional search for o;lang-=*A -> return only first entry, this is using the "special search filter format"
The rfc 3866 states in section 2.3 that, 'if ..an attribute is requested without a language tag option,then all attribute values regardless of their language tag option are returned', see the 'description' example.
-Dieter
Dieter Kluenter writes:
Zhang Weiwu zhangweiwu@realss.com writes:
First Entry is: o: Company A
Second Entry is: o: Company B o;lang-de: Aaaa
Then the patch I need would allow me to do a search for o with "*A" that only return me the first entry but do not return the second entry.
This would violate rfc 3866
Not at all. As Zhang suggests, it's fine if the client asks for it via an extension. The various LDAP RFCs say a lot of things which extension RFCs override.
One way would be a a control which says that filters should only match the provided attribute options, or maybe more generally that they should not match subtypes. Though the latter could be frustrating if it meant (objectClass=person) would not match 'objectClass: inetOrgPerson' if the entry did not explicitly include the 'person' object class as well.
Or some matching rules: (o:noSubTypeSubstringMatch:=*A).
I suspect maybe the patch would accept a special search filter format: search for o=*A -> return both entry, this is like traditional search for o;lang-=*A -> return only first entry, this is using the "special search filter format"
The rfc 3866 states in section 2.3 that, 'if ..an attribute is requested without a language tag option,then all attribute values regardless of their language tag option are returned', see the 'description' example.
The second search is not "an attribute is requested without a language tag option". However the suggestion is wrong because it already means something: It matches all 'o' attributes which have a language tag.
On Mon, 2007-07-16 at 14:55 +0200, Hallvard B Furuseth wrote:
Or some matching rules: (o:noSubTypeSubstringMatch:=*A).
The second search is not "an attribute is requested without a language tag option". However the suggestion is wrong because it already means something: It matches all 'o' attributes which have a language tag.
I am almost 100% sure my suggestion is wrong even before I post it but I have to find a way to make my requirement clear with example using my brain that lack in-depth understanding of LDAP. Such situation happens frequently when a customer want something they are not sure what it is, and often they are gave what they need by smart developers:) It's nice to see Hallvard suggested the idea closer to perfection.
So my question is: do someone have time to develop a patch doing something like allowing (o:noSubTypeSubstringMatch:=*A)? I just hope it isn't very expensive, I am under pressure of solving more problems with less resources. A patch that just works will do, putting it on ITS and submit a suggestion to IETF and wait 3.5 years before openLDAP accept this new feature introduced by RFC 7000 etc is very good but wouldn't work for my case (maybe by then I already left the project that needs this).
openldap-software@openldap.org