Skip Headers
Oracle® Secure Enterprise Search Administration API Guide
11g Release 1 (11.1.2.0.0)

E14133-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

Command Interface

The searchadmin command provides a command-line interface to the Administration API. You can open an interactive session, or you can issue individual commands to the operating system.

You must supply the administrator password each time you issue the searchadmin command. You can include the password in the command or wait for the prompt to enter it.

Opening an Interactive Session

To open an interactive session, enter the searchadmin command at the operating system prompt. After providing the administrator password, you get the SES prompt. You can start entering commands to the Oracle SES Administration API. This type of connection is called session mode.

Example 1-1 shows a brief interactive session, which ends with a quit command.

Example 1-1 Issuing Commands at the SES Prompt

$ searchadmin

Search Admin Command Line - Release 11.1.2.0.0
 
Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.

Password:
 
SES>getAPIVersion
 
11.1.2.0.0
 
SES>export index
 
<?xml version="1.0" encoding="UTF-8"?>
<search:config productVersion="11.1.2.0.0" xmlns:search="http://xmlns.oracle.com/search">
   <search:index>
      <search:indexingBatchSize>250</search:indexingBatchSize>
      <search:indexingMemorySize>275</search:indexingMemorySize>
   </search:index>
</search:config>
 
SES>quit
$

Issuing Individual Commands

You can issue commands individually at the operating system prompt. You can also use this command format to create scripts and batch files, thus simplifying routine tasks. This type of connection is called single job mode.

Example 1-2 shows two commands entered at the operating system prompt. One includes the password in the command, and the other responds to the Password prompt. In a script or batch file, include the password in each command.

Example 1-2 Issuing Commands at the Operating System Prompt

$ searchadmin getAPIVersion

Search Admin Command Line - Release 11.1.2.0.0
 
Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.

Password:

11.1.2.0.0
 
$ searchadmin --PASSWORD password export index

Search Admin Command Line - Release 11.1.2.0.0
 
Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
 

<?xml version="1.0" encoding="UTF-8"?>
<search:config productVersion="11.1.2.0.0" xmlns:search="http://xmlns.oracle.com/search">
   <search:index>
      <search:indexingBatchSize>250</search:indexingBatchSize>
      <search:indexingMemorySize>275</search:indexingMemorySize>
   </search:index>
</search:config>
 
$ 

Issuing Commands to Remote Oracle SES Instances

The searchadmin command connects to the local search instance defined by Oracle home. However, you can issue commands to one or more remote Oracle SES instances by supplying the connection information in the searchadmin command.

To connect to a single remote instance, use the --CONNECTION option with an HTTP connection string, like the one shown here. You can obtain the port number from the Oracle SES properties file at ORACLE_HOME/search/webapp/config/search.properties.

$ searchadmin --CONNECTION=http://myhost:7777/search/api/admin/AdminService

To connect to multiple instances, create a file with the connection information, then reference the file using the --CONNECTION_LIST option. Each command is executed across all instances.

This is the file format:

--USERNAME=eqsys --CONNECTION=http://myhost:7777/search/api/admin/AdminService

This command opens connections using a file named remotehosts.lst:

$ searchadmin --CONNECTION_LIST=remotehosts.lst

Using the Help Command

The Help command provides the basic command syntax and descriptions of administrative objects. You can enter the help command in an interactive session or as an individual command, as shown here:

$ searchadmin help

Search Admin Command Line - Release 11.1.2.0.0
 
Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.

 
Usage: searchadmin [<connectionArgs>] [<operation>] [<operationArgs>]
        .
        .
        .

Table 1-1 describes the searchadmin help commands.

Table 1-1 Help Syntax

Command Description

help

Provides the searchadmin command syntax, and lists the administrative object types and operations.

help object_type

Describes object_type.

help operation

Provides the command syntax for operation.

help statusCodes

Describes the status codes that are displayed after an operation is performed on multiple objects by createAll, deleteAll, deleteList, or updateAll.

help duplicateMethod

Describes the settings of the --DUPE_METHOD parameter in the createAll command.

help updateMethod

Describes the settings of the --UPDATE_METHOD parameter in the update and updateAll commands.

help notFoundMethod

Describes the settings of the --NOT_FOUND_METHOD parameter in the updateAll command.


Command Syntax

The following is a summary of the searchadmin command syntax.

searchadmin [--USERNAME=admin] [--PASSWORD=password] [{--CONNECTION=connection] | --CONNECTION_LIST=filename}] [operation] 

or

searchadmin [-u admin] [-p password] [{-c connection | -m filename}] [operation]
admin

Administrator user name, which is eqsys by default.

password

Password for the administrator. You are prompted for the password if you omit it from the command. If you are connecting to multiple instances, the password is used for authentication on all of them; omit this argument if they do not use the same password.

connection

Connection to a remote Oracle SES instance. The connection is to the local instance identified by Oracle home. You can connect using HTTP, using the following syntax:

http://host:port/search/api/admin/AdminService

For HTTP, the port number is the same as connecting to the Administration GUI.

filename

The name of the connection file. The path can be absolute or relative to the current directory.

operation

An administrative operation, as described in Chapter 3, "searchadmin Commands." Omit this argument to open an interactive session. Like the searchadmin command, the operations have a short form and a long form for many arguments.