Re: Extra character when using search filter but won't appear in the search result

Wan Mohd Khairi Wan Mohamed <[email protected]> Thu, 20 May 2010 16:08:14 +0800
Newsgroups gmane.network.openldap.general
Message-ID <[email protected]>
--00163646b6fcbd6b530487021414
Content-Type: text/plain; charset=UTF-8

Yes, indeed this is our case. I had to manually slapindex, then only we got
the correct result (even though we have specified the attribute to index
automatically in slapd.conf).

However, do we have to slapindex nightly since this is a case, or is this a
bug (we're using openldap 2.4.19)?

Thanks.

Regards,
Wan Mohd Khairi Wan Mohamed
wankhairi [at] nervesis [dot] com [dot] my
http://www.nervesis.com.my


On Sat, May 15, 2010 at 10:40, <[email protected]> wrote:

> > Hi all,
> >
> > We have a little bit of a problem here. When we tried to search in
> > openldap
> > with the following filter:-
> >
> > (&(uid=user1)(customAttribute=somevalue))
> >
> > ... it returned no results. But when we use a similar filter, with an
> > asterisk (*) appended for the 2nd attribute:-
> >
> > (&(uid=user1)(customAttribute=somevalue*))
> >
> > We got the result just fine. The funny thing is, the result listed
> > customAttribute value as just 'somevalue'. We were wondering what's the
> > extra character that's preventing us from getting the result when using
> > the
> > filter without the asterisk.
> >
> > Have anyone encountered similar problem before?
>
> All those that change indexes without reindexing the database (man
> slapindex(8) for details) experience a similar behavior.  Could it be your
> case?
>
> p.
>
>

--00163646b6fcbd6b530487021414
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Yes, indeed this is our case. I had to manually slapindex, then only we got=
 the correct result (even though we have specified the attribute to index a=
utomatically in slapd.conf). <br><br>However, do we have to slapindex night=
ly since this is a case, or is this a bug (we&#39;re using openldap 2.4.19)=
?<br>

<br>Thanks.<br><br><span style=3D"color: black;"><div dir=3D"ltr"><div><spa=
n style=3D"font-family: trebuchet ms,sans-serif; font-size: small;">
Regards,<br>
<span style=3D"font-weight: bold; color: rgb(0, 0, 102);">Wan Mohd Khairi W=
an Mohamed</span><br>
<span style=3D"font-style: italic; color: rgb(102, 102, 102);">wankhairi [a=
t] nervesis [dot] com [dot] my</span><br>
<a style=3D"font-style: italic; color: rgb(102, 102, 102);" href=3D"http://=
www.nervesis.com.my" alt=3D"Nervesis Sdn Bhd">http://www.nervesis.com.my</a=
>
</span></div></div></span><br><br><div class=3D"gmail_quote">On Sat, May 15=
, 2010 at 10:40,  <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]=
imi.it">[email protected]</a>&gt;</span> wrote:<br><blockquote class=
=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid=
 rgb(204, 204, 204); padding-left: 1ex;">

<div class=3D"im">&gt; Hi all,<br>
&gt;<br>
&gt; We have a little bit of a problem here. When we tried to search in<br>
&gt; openldap<br>
&gt; with the following filter:-<br>
&gt;<br>
&gt; (&amp;(uid=3Duser1)(customAttribute=3Dsomevalue))<br>
&gt;<br>
&gt; ... it returned no results. But when we use a similar filter, with an<=
br>
&gt; asterisk (*) appended for the 2nd attribute:-<br>
&gt;<br>
&gt; (&amp;(uid=3Duser1)(customAttribute=3Dsomevalue*))<br>
&gt;<br>
&gt; We got the result just fine. The funny thing is, the result listed<br>
&gt; customAttribute value as just &#39;somevalue&#39;. We were wondering w=
hat&#39;s the<br>
&gt; extra character that&#39;s preventing us from getting the result when =
using<br>
&gt; the<br>
&gt; filter without the asterisk.<br>
&gt;<br>
&gt; Have anyone encountered similar problem before?<br>
<br>
</div>All those that change indexes without reindexing the database (man<br=
>
slapindex(8) for details) experience a similar behavior. =C2=A0Could it be =
your<br>
case?<br>
<br>
p.<br>
<br>
</blockquote></div><br>

--00163646b6fcbd6b530487021414--