Subject: Example 4: Configure Server -- Create index
Author: eLDAP
In response to: Example 3: Configure Server -- Create a backend
Posted on: 08/17/2011 09:39:09 PM
C:\tmp\OpenDJ-2.4.3\bat>dsconfig -p 4444 -D "cn=Directory Manager" -w password --trustAll
create-local-db-index --backend-name myDate --index-name cn
--set index-type:equality --set index-type:substring
>>>> Configure the properties of the Local DB Index
Property Value(s)
-----------------------------------------------------------------------
1) attribute cn
2) index-entry-limit 4000
3) index-extensible-matching-rule No extensible matching rules will be
indexed.
4) index-type equality, substring
?) help
f) finish - create the new Local DB Index
q) quit
Enter choice [f]:
The Local DB Index was created successfully
>
> On 08/17/2011 08:55:31 PM
eLDAP wrote:
C:\tmp\OpenDJ-2.4.3\bat>dsconfig -p 4444 -D "cn=Directory Manager" -w password --trustAll
create-backend --backend-name myDate --set base-dn:o=myData --set enabled:true --type local-db
>>>> Configure the properties of the Local DB Backend
Property Value(s)
---------------------------
1) backend-id myDate
2) base-dn o=myData
3) compact-encoding true
4) db-cache-percent 10
5) db-cache-size 0 b
6) db-directory db
7) enabled true
8) index-entry-limit 4000
9) writability-mode enabled
?) help
f) finish - create the new Local DB Backend
q) quit
Enter choice [f]:
The Local DB Backend was created successfully
Note #1: create-backend creates only naming context.
A search is run against the newly create backend will fail to bring back anything:
C:\tmp\OpenDJ-2.4.3\bat>ldapsearch -p 389 -D "cn=Directory Manager" -w password -b "o=myData" -s sub "(objectclass=*)"
SEARCH operation failed
Result Code: 32 (No Such Entry)
Additional Information: The search base entry 'o=myData' does not exist
This is due to the fact that no data has been populated to this backend yet.
Note #2: dsconfig requires that the server to be configured must be running.
If you stop the server and run the same command again:
C:\tmp\OpenDJ-2.4.3\bat>dsconfig -p 4444 -D "cn=Directory Manager" -w password --trustAll
create-backend --backend-name myDate --set base-dn:o=myData --set enabled:true --type local-db
Unable to connect to the server at "localhost" on port 4444
References: