Search Using the Virtual List View Control

Overview#

Searching Using the Virtual List View Control

The Virtual List View Control allows a client to request that the server send search results in small, manageable chunks within a specific range of entries. It also allows a client to move forward and backward through the results of a search operation if configured with a GUI browser or application, or jump directly to a particular entry.

Note - The Virtual List View Control requires that the returned entries be sorted.

Together with the --virtualListView option or its short form -G, specify the following arguments:

The arguments (0:4:1:0) indicate that you want to show 0 entries before and 4 entries after the target entry at index 1. If the client does not know the size of the set, the count is 0.

To Search Using the Virtual List View Control

The sort order option (-S) must be used with the Virtual List View control. This example uses the Virtual List View Control options to specify the following:

Thus, the server returns the first entry plus two entries after the target sorted in ascending order by the givenName attribute.

Use the ldapsearch command with the --virtualListView option.

Here is a LDAP Query Example Using the Virtual List View Control on a particular LDAP Server:

$ ldapsearch -h localhost -p 1389 -D "cn=Directory Manager" -w bindPassword -b dc=example,dc=com --searchScope sub --sortOrder givenName  --virtualListView "0:2:1:0" "(objectclass=*)"

dn: uid=awhite,ou=People,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: top
givenName: Alan
uid: awhite
cn: Alan White
sn: White
...

dn: uid=aworrell,ou=People,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: top
givenName: Alan
uid: aworrell
cn: Alan Worrell
sn: Worrell
...

dn: uid=alutz,ou=People,dc=example,dc=com
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: top
givenName: Alexander
uid: alutz
cn: Alexander Lutz
sn: Lutz
...

# VLV Target Offset: 1
# VLV Content Count: 172

More Information#

There might be more information for this subject on one of the following: