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

RE: ldapsearch could not return some entries.



Hello!

I'm new in OpenLDAP but I think maybe problem with indexes?
Do you use Berkeley DB?
Do you index 'o' attributes? (in slapd.conf look for index o sub,subInitial,
subFinal and subANY).
Do you recreate indexes by 'slapindex' after updating?
Maybe adding 
index o sub,subany
to slamd.conf and 'slapindex' after that may help.
(Maybe also try to add subInitial,subFinal)

Or try to change length of indexes:

(man slamd.conf)

     index_substr_if_minlen <integer>
          Specify the minimum length for subinitial and  subfinal
          indices.  An  attribute  value  must have at least this
          many  characters  in  order  to  be  processed  by  the
          indexing functions. The default is 2.

     index_substr_if_maxlen <integer>
          Specify the maximum length for subinitial and  subfinal
          indices.  Only  this  many  characters  of an attribute
          value will be processed by the indexing functions;  any
          excess characters are ignored. The default is 4.
          excess characters are ignored. The default is 4.

     index_substr_any_len <integer>
          Specify  the  length  used  for  subany   indices.   An
          attribute value must have at least this many characters
          in order to be processed. Attribute values longer  than
          this  length  will  be  processed  in  segments of this
          length. The default is 4. The subany index will also be
          used  in subinitial and subfinal index lookups when the
          filter string is longer than the index_substr_if_maxlen
          value.

     index_substr_any_step <integer>
          Specify the steps used in subany  index  lookups.  This
          value  sets  the  offset  for  the segments of a filter
          string that are processed for a  subany  index  lookup.
          The default is 2. For example, with the default values,
          a  search  using  this  filter  "cn=*abcdefgh*"   would
          generate index lookups for "abcd", "cdef", and "efgh".

Maybe add additional options to 'slapindex' - wrong base directories?

Sergey.

-----Original Message-----
From: owner-openldap-software@OpenLDAP.org
[mailto:owner-openldap-software@OpenLDAP.org] On Behalf Of Wang Penghui
Sent: Wednesday, July 26, 2006 7:53 AM
To: OpenLDAP-software@OpenLDAP.org
Cc: 张?武
Subject: ldapsearch could not return some entries.

Hello, everyone,

Recently, i have upgraded one of my openldap installations, the version
upgrade from 2.1.31 to 2.3.24 in the gentoo box.

And i also change the backend from ldbm to bdb which is the default
database backend of openldap.

Before the upgrading i have used the command slapcat dump all the data
from the old version openldap server.

After the upgrading, i use slapadd to import the dumped backup to the
new version installation. 

Then there is a strange problem.

There is a entry with the "o" attribute, the value is 
NEXOS TRADING GMBH & CO.KNingbo Representative Office

then i use the follow command to make a search

ldapsearch -x -D "cn=manager,dc=xxx" -w xxx -b "ou=contacts,dc=xxx"
o="*NEX*"

It will return the correct result.

use 
ldapsearch -x -D "cn=manager,dc=xxx" -w xxx -b "ou=contacts,dc=xxx"
o="*NEXO*

It will return nothing.

use
ldapsearch -x -D "cn=manager,dc=xxx" -w xxx -b "ou=contacts,dc=xxx"
o="*NEXOS*

It will return nothing.

use 
ldapsearch -x -D "cn=manager,dc=xxx" -w xxx -b "ou=contacts,dc=xxx"
o="*XOS*

It will return the correct result.

That's very strange.

Then i use a ldap client to connect to the server then cut the value of
"o" and paste it again.

After that, everthing seems okay.

But i also find some other entry has the same problem.

Does someone have some experiences on this topic?

Every reply is very appreciated.

Wang Penghui

-- 
Name.   Wang Penghui | 王 鹏辉
Tel.    0086-592-8389650
Mail.   wangpenghui@gmail.com
Web.    http://www.wangpenghui.name
Blog.   http://www.wangpenghui.name/blog