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

indexing of Attributes for presence (ITS#1486)



Full_Name: Georg Knittel
Version: 2.0.15
OS: solaris 2.8
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (193.23.96.12)


I am working now with about 70.000 instance of one object in one Directory
Server. I am using
openldap 2.0.15
java 1.2 / jndi 1.2.1
All operations to and from the Directory Server are done via java/jndi.


In the index file I included the following line:
index default pres,eq
Therefore every attribute should be indexed by presence.

In the schema file I have somehat like:
objectclass o1 ...
  MUST (Att_must1 $ Att_must2)
  MAY  (Att_may1 $ Att_may2 ... Att_mayn)

Now I am going to write 100 instances of o1, by setting the values Att_must1, 
Att_must2 and for example Att_May1. Att_may2 is not set.

Thereafter I filter by (&(objectclass=o1)(Att_may1)) and I will get back 100
Objects.
That is fine.

Then I filter by (&(objectclass=o1)(Att_may2)) and still I will get back 100
Objects.
That is not so fine. It seems that openldap assumed the existence of Null value
Attributes
during creation.

It will come even better. Ok, I try to set Att_may2 = null. openldap refuses to
accept
that request. This seems to be inconsistent with the behaviour described
before.

Now I go througth all 100 Objects and delete Att_may2,(which I never added
before).
Filtering again by (&(objectclass=o1)(Att_may2)) I will get back 0 objects. That
is fine
again. Adding to any o1 instance Att_may2, filtering works allways perfecto.

I think the very best behaviour should be like that:
Setting no Attribute, the presence of that Attribute should not be included to
the index table.
Setting an Attribute to NULL, the Attribute should be included to the index
table, still having no value.

Does it sounds OK like that?