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

Re: VLV indices and multi-value attributes



Eric C. Hagberg wrote:
respect to what should be done when an LDAP server (supporting the vlv
control) creates a vlv index for an attribute, especially with respect
to how it should handle a multi-valued attribute.
Indexing mechanisms, while tentatively implied, are notspecified or discussed in the VLV protocol spec.
The result set must be invariant under any set of indexing
implementations. The Netscape server implementation
of VLV supports non-indexed VLV searches too.
For example, the server we're using to query has a database containing
some records which have more than one last name. If we create a vlv
index, only the first (or last?) attribute value is placed in the index.
This creates an apparent lack of data if you display a page of results
which doesn't contain the "missing" (non-indexed) attibute value, which
would not be missing if you did a similar "normal" substring query on
the sn attribute.
The key factor is that all VLV searches are also sorted (server-sidesorting control is required). The rules for how to treat sorted entries
where multiple values are present are defined in X.500. (probably
X.501, I'm not in possession of a copy right this minute).
So, I would think that it would make sense to have multiple-valued
attributes vlv-indexed for each value, rather than just arbitrarily
throwing away one (or more) of the values when creating the index.
It's certainly possible to take this view, but in our implementation
we followed the X.500 sorting rules, which say that an entry shall
appear only once in a sorted list, even if it possesses multiple values
for a sorted attribute. Note that the decision as to which value
to use is strictly based on relative magnitude comparison of the values,
it isn't arbitrary.

There was a time when I agreed with your assertion.
I'd be interested to hear from others with experience
in using and implementing server-side sorting, and perhaps
from anyone who remembers how X.500 came to define
things the way it does.