Ville Silventoinen
2007-Mar-23 17:01 UTC
[Fedora-directory-users] VLV index and uid attribute
I know there was an earlier thread about using uid attribute for sorting and that it''s not supported by the Console: http://www.mail-archive.com/fedora-directory-users@redhat.com/msg04439.html However, I thought I''d try following approach: 1. I deleted previous Browsing index for People by using the Console. 2. I created following VLV entries as it suggests in the Admin Guide "Managing Indexes" chapter (my database is called "ebiRoot"): dn: cn=MCC ou=People dc=ebi dc=ac dc=uk,cn=ebiRoot,cn=ldbm database,cn=plugins,cn=config objectClass: top objectClass: vlvSearch cn: MCC ou=People dc=ebi dc=ac dc=uk vlvBase: ou=People,dc=ebi,dc=ac,dc=uk vlvScope: 1 vlvFilter: (|(objectclass=*)(objectclass=ldapsubentry)) dn: cn=by MCC ou=People dc=ebi dc=ac dc=uk,cn=MCC ou=People dc=ebi dc=ac dc=uk,cn=ebiRoot,cn=ldbm database,cn=plugins,cn=config objectClass: top objectClass: vlvIndex cn: by MCC ou=People dc=ebi dc=ac dc=uk vlvSort: uid 3. Then I shutdown slapd and ran the vlvindex command: $ ./vlvindex -n ebiRoot -T "by MCC ou=People dc=ebi dc=ac dc=uk" [23/Mar/2007:16:47:05 +0000] - WARNING: Import is running with nsslapd-db-private-import-mem on; No other process is allowed to access the database [23/Mar/2007:16:47:05 +0000] - dblayer_instance_start: pagesize: 4096, pages: 518726, procpages: 6433 [23/Mar/2007:16:47:05 +0000] - cache autosizing: import cache: 204800k [23/Mar/2007:16:47:05 +0000] - li_import_cache_autosize: 50, import_pages: 51200, pagesize: 4096 [23/Mar/2007:16:47:06 +0000] - ebiRoot: Indexing VLV: by MCC ou=People dc=ebi dc=ac dc=uk [23/Mar/2007:16:47:06 +0000] - ebiRoot: Indexed 1000 entries (70%). [23/Mar/2007:16:47:06 +0000] - ebiRoot: Finished indexing. Looks like everything went well from the output. 4. Start slapd, start the console. When I view People, they are still sorted by cn. Why does it ignore the VLV config that created above? I also confirmed from Console that vlvsort is set to "uid". This is not a major problem, I''m just curious why the above solution doesn''t work? It looks like Console doesn''t care what the vlvSort value is? I don''t understand how it can sort with cn when there is no index. Thanks! Ville
Ulf Weltman
2007-Mar-23 17:55 UTC
Re: [Fedora-directory-users] VLV index and uid attribute
Ville Silventoinen wrote:> I know there was an earlier thread about using uid attribute for > sorting and that it''s not supported by the Console: > > http://www.mail-archive.com/fedora-directory-users@redhat.com/msg04439.html > > > However, I thought I''d try following approach: > > 1. I deleted previous Browsing index for People by using the Console. > > 2. I created following VLV entries as it suggests in the Admin Guide > "Managing Indexes" chapter (my database is called "ebiRoot"): > > dn: cn=MCC ou=People dc=ebi dc=ac dc=uk,cn=ebiRoot,cn=ldbm > database,cn=plugins,cn=config > objectClass: top > objectClass: vlvSearch > cn: MCC ou=People dc=ebi dc=ac dc=uk > vlvBase: ou=People,dc=ebi,dc=ac,dc=uk > vlvScope: 1 > vlvFilter: (|(objectclass=*)(objectclass=ldapsubentry)) > > dn: cn=by MCC ou=People dc=ebi dc=ac dc=uk,cn=MCC ou=People dc=ebi > dc=ac dc=uk,cn=ebiRoot,cn=ldbm database,cn=plugins,cn=config > objectClass: top > objectClass: vlvIndex > cn: by MCC ou=People dc=ebi dc=ac dc=uk > vlvSort: uid > > 3. Then I shutdown slapd and ran the vlvindex command: > > $ ./vlvindex -n ebiRoot -T "by MCC ou=People dc=ebi dc=ac dc=uk" > > [23/Mar/2007:16:47:05 +0000] - WARNING: Import is running with > nsslapd-db-private-import-mem on; No other process is allowed to > access the database > [23/Mar/2007:16:47:05 +0000] - dblayer_instance_start: pagesize: 4096, > pages: 518726, procpages: 6433 > [23/Mar/2007:16:47:05 +0000] - cache autosizing: import cache: 204800k > [23/Mar/2007:16:47:05 +0000] - li_import_cache_autosize: 50, > import_pages: 51200, pagesize: 4096 > [23/Mar/2007:16:47:06 +0000] - ebiRoot: Indexing VLV: by MCC ou=People > dc=ebi dc=ac dc=uk > [23/Mar/2007:16:47:06 +0000] - ebiRoot: Indexed 1000 entries (70%). > [23/Mar/2007:16:47:06 +0000] - ebiRoot: Finished indexing. > > Looks like everything went well from the output. > > 4. Start slapd, start the console. When I view People, they are still > sorted by cn. Why does it ignore the VLV config that created above? I > also confirmed from Console that vlvsort is set to "uid".The DirBrowser in the Directory Console sends a control requesting serverside sorting for an order of cn,givenname,o,ou,sn. Configurable sort order is an RFE for a future release. http://cvs.fedora.redhat.com/lxr/dirsec/source/directoryconsole/src/com/netscape/admin/dirserv/browser/BrowserController.java#75> > This is not a major problem, I''m just curious why the above solution > doesn''t work? It looks like Console doesn''t care what the vlvSort > value is? I don''t understand how it can sort with cn when there is no > index. > > Thanks! > Ville > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users >
David Boreham
2007-Mar-23 19:16 UTC
Re: [Fedora-directory-users] VLV index and uid attribute
Ville Silventoinen wrote:> This is not a major problem, I''m just curious why the above solution > doesn''t work? It looks like Console doesn''t care what the vlvSort > value is? I don''t understand how it can sort with cn when there is no > index.A client may present any VLV request it likes to the server. The server will attempt to service the request and respond. Indices are used if possible, but they are optional. So in your case the VLV requests made by the console would have become unindexed. If the number of entries is reasonably small performance would remain good.
Ville Silventoinen
2007-Mar-26 09:33 UTC
Re: [Fedora-directory-users] VLV index and uid attribute
On Fri, 23 Mar 2007, David Boreham wrote:> Ville Silventoinen wrote: > >> This is not a major problem, I''m just curious why the above solution >> doesn''t work? It looks like Console doesn''t care what the vlvSort value is? >> I don''t understand how it can sort with cn when there is no index. > > A client may present any VLV request it likes to the server. > The server will attempt to service the request and respond. > Indices are used if possible, but they are optional. > So in your case the VLV requests made by the console > would have become unindexed. If the number of entries > is reasonably small performance would remain good. >David and Ulf: Thanks for the explanation. Looking forward for the new feature. Cheers, Ville