Show Menu
TOPICS×

About Remote Control for Indexing

Whenever your website changes, you can run a script or program requesting that the search robot run an index using Remote Control.

Using Remote Control for Indexing

The remote control indexing request typically comes from a script or a program that is located on your server.
The robot performs the same indexing steps as though it had been started manually from the Index menu. To submit a remote control request, you configure the necessary password and response strings.

How to make a remote control request

To make a remote control request, use the following format examples based on the location of your data center:
Data center location
Example
London
https://center.lon5.atomz.com/search/cgiindex.tk? sp_a=sp99999999&sp_password=xxxxxx&sp_operation=op
North America
https://center.atomz.com/search/cgiindex.tk? sp_a=sp99999999&sp_password=xxxxxx&sp_operation=op
Singapore
https://center.sin2.atomz.com/search/cgiindex.tk? sp_a=sp99999999&sp_password=xxxxxx&sp_operation=op
or
String and value
Description
sp_a= sp99999999
Your account number.
You can find your account number under Settings > Account Options > Account Settings .
sp_lines= N
Lets you check the status of a running index crawl.
N is either a positive integer or all . If this is a numeric value, the last N lines of the corresponding index log file are included in the JSON response.
If the value is all , the entire file is returned.
If the value is 0 , then no log information is returned. This value is the default for a running index status query.
sp_operation= op
Lets you specify one of the following indexing operations that you want to run:
  • full_index
    The search robot runs a full index of your website.
  • incremental_index
    The search robot runs an incremental index using the configuration that is set under Index > Incremental Index > Configuration .
  • vertical_index
    The search robot runs a vertical update using the configuration that is set under Index > Vertical Update > Configuration .
  • script_index
    The search robot runs an incremental index using the text file that is specified under Index > Scripted Index > Configuration .
  • full_staged_index
    The search robot runs a full staged index of your website.
  • incremental_staged_index
    The search robot runs an incremental staged index using the configuration that is set under Index > Incremental Index > Configuration .
  • vertical_staged_index
    The search robot runs a vertical staged update using the configuration that is set under Index > Vertical Update > Configuration .
Note: To use Vertical Updates, you may need to have it enabled in your account by your Adobe account representative or by Adobe Support.
You can append _saved to any of the above sp_operation values to have the search robot attempt to use saved content. For example, you could specify the following:
sp_operation=full_index_saved
or
sp_operation=full_staged_index_saved
Or, you can append _status to any of the above sp_operation values to request a status report for the current, or most recent, operation. For example, you could specify the following:
sp_operation=full_index_status
or
sp_operation=full_staged_index_status
and the results are returned as a JSON object. Include sp_lines=N to include N lines of the associated log file. If N is negative, the last N lines are included.
sp_operation= pushlive
Lets you remotely push live a staged index.
Any attempt to append _saved to the push live operation is ignored.
When you run a pushlive operation an OK, Priority, or Error response text string is returned to the server. You specify these response strings on the Remote Control page.
If you push live when there is no staged index, nothing happens and the OK response string is returned.
sp_password= xxxxxx
The remote control password.
Search returns data in the form of a proper HTTP response. The full response is composed of an HTTP status, HTTP response headers, a blank line, and the response string.
For example, suppose that you perform the following remote control request:
https://center.atomz.com/search/cgiindex.tk?sp_a=sp99999999&sp_password=my-password&sp_operation=full_index

The following is the response from the server:
Status: 200 OK 
Content-type: text/plain 
OK

Or, suppose that you perform the following remote control status request:
https://center.atomz.com/search/cgiindex.tk?sp_a=sp99999999&sp_password=my-password&sp_operation=full_index_status

The response from the server might look like the following:
Status: 200 OK 
Content-type: application/json; charset=utf-8 
{ 
    "current_time": "2017-08-27T10:58:58-0700", 
    "start_time": "2017-07-25T16:40:07-0800", 
    "end_time": "2017-07-25T16:40:20-0800", 
    "elapsed_seconds": 13, 
    "elapsed_seconds_fmt": "13s", 
    "state": "finished", 
    "docs_indexed": 3, 
    "depth": 0, 
    "errors": 0, 
    "status": 1, 
    "message": "ok" 
}

To get the first ten lines of the log listing that is associated with this index operation, along with its status, the following query is used:
https://center.atomz.com/search/cgiindex.tk?sp_a=sp99999999&sp_password=my-password&sp_operation=full_index_status&sp_lines=10

The response from the server:
Status: 200 OK 
Content-type: application/json; charset=utf-8 
{ 
    "current_time": "2017-08-27T10:59:30-0700", 
    "start_time": "2017-07-25T16:40:07-0800", 
    "end_time": "2017-07-25T16:40:20-0800", 
    "elapsed_seconds": 13, 
    "elapsed_seconds_fmt": "13s", 
    "state": "finished", 
    "docs_indexed": 3, 
    "depth": 0, 
    "errors": 0, 
    "offset": 672, 
    "lines": [ 
        "07/25 16:40:07 PST   ======== Starting manual crawl of account sp99999999. ========", 
        "07/25 16:40:08 PST   Loading existing data", 
        "07/25 16:40:08 PST   Downloading entrypoint https://www.atomz.com/", 
        "07/25 16:40:08 PST   Robots.txt exclude mask: https://www.atomz.com/snap", 
        "07/25 16:40:08 PST   Exclude mask: regexp ^https://www.atomz.com/$", 
        "07/25 16:40:08 PST   Include mask: https://www.atomz.com/", 
        "07/25 16:40:08 PST   Downloading https://www.atomz.com/style.css", 
        "07/25 16:40:09 PST   Ignoring https://www.atomz.com/style.css, document type 'text/css'.", 
        "07/25 16:40:09 PST   Downloading https://www.atomz.com/privacy.html", 
        "07/25 16:40:09 PST   Downloading https://www.atomz.com/terms.html" 
    ], 
    "status": 1, 
    "message": "ok" 
}

Note the offset value. This value identifies the file-offset position in the log file where reading left off. To read the next ten lines in the file, you would include, in this example, &sp_offset=672 in the request sent to the server.
Using sp_offset , you can effectively page through a log file.
To get the last ten lines of the log, along with the status, specify the count as a negative number. For example, specify sp_lines= with a value of -10 as in the following:
https://center.atomz.com/search/cgiindex.tk?sp_a=sp99999999&sp_password=my-password&sp_operation=full_index_status&sp_lines=-10

The response from the server:
Status: 200 OK 
Content-type: application/json; charset=utf-8 
{ 
    "current_time": "2017-08-27T11:01:14-0700", 
    "start_time": "2017-07-25T16:40:07-0800", 
    "end_time": "2017-07-25T16:40:20-0800", 
    "elapsed_seconds": 13, 
    "elapsed_seconds_fmt": "13s", 
    "state": "finished", 
    "docs_indexed": 3, 
    "depth": 0, 
    "errors": 0, 
    "lines": [ 
        "07/25 16:40:20 PST   End Time: 07/25/2017 16:40:20 PST", 
        "07/25 16:40:20 PST   Elapsed Time: 13 seconds", 
        "07/25 16:40:20 PST   Pages Crawled: 3 pages", 
        "07/25 16:40:20 PST   Pages Indexed: 3 pages", 
        "07/25 16:40:20 PST   Words/Bytes Indexed: 2373 words/ 20618 bytes", 
        "07/25 16:40:20 PST   Errors: 0", 
        "07/25 16:40:20 PST   *** Index Summary ***", 
        "07/25 16:40:20 PST   Total Pages: 3", 
        "07/25 16:40:20 PST   --------------------------------------------------------------------", 
        "07/25 16:40:20 PST   ======== Finish manual crawl of account sp99999999: Done. ========" 
    ], 
    "status": 1, 
    "message": "ok" 
}

Note that there is no offset value returned here, as this operation finished at the end of the file, and there are no more lines to read.

Configuring Remote Control for indexing

Whenever your website changes, you can use Remote Control to run a script or program from your server, requesting that the search robot run an index.
To configure Remote Control for indexing
  1. On the product menu, click Index > Remote Control .
  2. On the Remote Control page, set each configuration field option to be able to submit an indexing request from your server automatically to index your website.
    Option
    Description
    Remote Control Password
    Specify the remote control password.
    Passwords are case sensitive, at least six characters long, and must include at least one letter. It is recommended that you also include at least one number.
    Do not use your site search/merchandising login password.
    Your password is used in each remote control request.
    OK Response String
    Lets you specify an OK response text string if the requested index operation begins successfully. In such cases, the search robot returns your OK response string to the server.
    Priority Response String
    If another indexing operation is in progress when the remote request is made, the search robot cannot perform the requested index. In such cases, your Priority response text string is returned to the server.
    Error Response String
    Lets you specify an Error response text string If your password is incorrect, or if another error occurs. In such cases, the search robot returns your Error response string back to the server.
  3. Click Save Changes .