How to configure VLV indexes on Oracle Directory Server Enterprise Edition 11.1.1.5.0 (Doc ID 1396420.1)

Last updated on OCTOBER 11, 2016

Applies to:

Oracle Directory Server Enterprise Edition - Version 6.0 to 11.1.1.7.0 [Release 6.0 to 11gR1]
Information in this document applies to any platform.

Goal

This document covers the following topics:

When an LDAP client issues a search, it may require that the server return data in segments rather than as one long stream of data. In order for the server to successfully search and return the requested data back to client "block by block" within the acceptable time limit, a VLV index (also known as browsing index) needs to be created on the server otherwise the search will be unindexed (notes=U).

This VLV index has to match the search exactly in the following four fields:
- search base
- search scope
- search filter
- sort index

If any of the four elements above do not match the configured VLV index then the index will not be used.

NOTE - Oracle Directory Server Enterprise Edition does not support Simple Paged Results

Below is an example of a search performed against ODSEE 11.1.1.5.0 where no VLV Index is configured.

# ldapsearch -D "cn=directory manager" -w password -p 1150 -b ou=people,dc=example,dc=com -s one -G 1:2:BBB8 -S "uid givenname" -x objectclass=person
version: 1
dn: uid=BBB7, ou=people, dc=example,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
userPassword: {SHA}aluWfd0LYY9ImsJb3h4afrI4AXk=
givenName: U7
cn: U7 L7
uid: BBB7
sn: L7

dn: uid=BBB8, ou=people, dc=example,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
userPassword: {SHA}aluWfd0LYY9ImsJb3h4afrI4AXk=
givenName: U8
cn: U8 L8
uid: BBB8
sn: L8

dn: uid=BBB9, ou=people, dc=example,dc=com
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
userPassword: {SHA}aluWfd0LYY9ImsJb3h4afrI4AXk=
givenName: U9
cn: U9 L9
uid: BBB9
sn: L9
index 9 content count 10

The above ldapsearch shows that

  1. the base is "ou=people,dc=example,dc=com"
  2. the scope is "one level" below "ou=people,dc=example,dc=com"
  3. the filter is any entry with objectclass=person in it.
  4. The sort order is "uid" and "givename"

The corresponding access log reports

[19/Jan/2012:01:54:05 -0500] conn=5 op=-1 msgId=-1 - fd=35 slot=35 LDAP connection from 127.0.0.1:62732 to 127.0.0.1
[19/Jan/2012:01:54:05 -0500] conn=5 op=0 msgId=1 - BIND dn="cn=directory manager" method=128 version=3
[19/Jan/2012:01:54:05 -0500] conn=5 op=0 msgId=1 - RESULT err=0 tag=97 nentries=0 etime=0.000130 dn="cn=directory manager"
[19/Jan/2012:01:54:05 -0500] conn=5 op=1 msgId=2 - SRCH base="ou=people,dc=example,dc=com" scope=1 filter="(objectClass=person)" attrs=ALL
[19/Jan/2012:01:54:05 -0500] conn=5 op=1 msgId=2 - SORT uid givenname
[19/Jan/2012:01:54:05 -0500] conn=5 op=1 msgId=2 - VLV 1:2:BBB8 9:10 (0)
[19/Jan/2012:01:54:05 -0500] conn=5 op=1 msgId=2 - RESULT err=0 tag=101 nentries=3 etime=0.000380 notes=U
[19/Jan/2012:01:54:05 -0500] conn=5 op=2 msgId=3 - UNBIND
[19/Jan/2012:01:54:05 -0500] conn=5 op=2 msgId=-1 - closing from 127.0.0.1:62732 - U1 - Connection closed by unbind client -
[19/Jan/2012:01:54:06 -0500] conn=5 op=-1 msgId=-1 - closed.

From the above access log

  1. the base dn of the search is "ou=people,dc=example,dc=com"
  2. the scope is one level (scope=1) below the base dn.
  3. the filter is "objectclass=person"
  4. the sort order is "uid" & "givenname"

Line 6 from the above access log snippet, VLV 1:2:BBB8 9:10 (0), describes the sort order requested in the ldapsearch.

-G before:after:index:count | before:after:value where 'before' and
'after' are the number of entries surrounding 'index.'
'count' is the content count, 'value' is the search value.

In this example we requested

Line 7 shows that three entries matched the search criteria, the etime was sub second and the search was unindexed (notes=U).

 

-G is optional, for additional details see

http://docs.oracle.com/cd/E19656-01/821-1509/ldapsearch-1/index.html
-G pattern

   Retrieve a virtual list view displaying a portion of the total search results. Use this option with the -S and -x options to sort entries returned.

   The specified pattern may take one of two forms to specify the size of the virtual list view around a target entry:

   entriesbefore:entriesafter:value

       Return the target entry, which is the first entry in the sorted results whose sort attribute is greater than or equal to the specified value, as well as the specified number of entries before the target entry and the specified number of entries after the target entry.

       For example, -S sn -x -G 5:10:johnson returns 16 entries in alphabetical order of the surname attribute: 5 less than johnson, the entry equal to or following johnson, and the 10 subsequent entries.
   entriesbefore:entriesafter:index:count

       Return the target entry, as well as the specified number of entries before the target entry and the specified number of entries after the target entry. The target entry depends on the index and estimated count arguments.

       The count argument may take the following values, with the following results:

       count == 0

           The target is the entry at the specified index position, starting from 1, and relative to the entire list of sorted results.
       count == 1

           The target is the first entry in the list of sorted results.
       count > 1

           The target is the first entry in the slice of the list represented by the fraction index/count.

           Use an index argument greater than the count argument to target the last result in the list.

       For example, -G 5:10:2:4 specifies the index closest to the beginning of the second quarter of the entire list. If the search yielded 100 entries, the target index would be 26, and this pattern would return entries 21 through 36.

       The number of entries displayed before and after the target entry may be limited by the beginning and end of the virtual list. The ldapsearch command displays the control response, giving the count of entries in the virtual list and the index of the target entry. Use these values to refine index and count arguments.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms