Create Search Index
Creates a search index item in an indexes element.
Creating a new search index does not force a reindex of the database. therefore, after creating a search index it is important to reindex the database.
Request
URI: /v2/searchindex/{name}
HTTP Method: PUT
- Accept:
[application/json] OR [application/xml] - Content-Type:
[application/json] OR [application/xml]
- name: The name of the search index to be created. Just to identify the proper resource to be called. The actual value never used.
- XML:
<index attribute="" id="exampleID" ignore="" inline="" standards="DITA" tags="" xpath="//fig/title" xpath_end="title"/> - JSON:
{"attribute":"", "id":"exampleID", "ignore":"", "inline":"", "standards":"DITA", "tags":"", "xpath":"//indexterm[not(parent::indexterm)]", "xpath_end":"indexterm"}
Response
- XML:
<result message="Action = create_index" messageKey="Action = create_index" status="SUCCESS" statusCode="0"/> - JSON:
{"statusCode":0,"messageKey":"Action = create_index", "message":"Action = create_index", "status":"SUCCESS", "info":[]}
- XML:
<result message="Action = create_index" messageKey="Action = create_index" status="FAIL" statusCode="500"/> - JSON:
{"statusCode":500,"messageKey":"Action = create_index", "message":"Action = create_index", "status":"FAIL", "info":[]}
Permissions
"Manage application"
Example
Request:
PUT http://example.corp:8080/LiveContent/v2/searchindex/exampleID
Accept: applicaton/xml
Content-Type: applicaton/xml
Request Body: <index attribute="" id="exampleID" ignore="" inline="" standards="DITA" tags="" xpath="//fig/title" xpath_end="title"/>
Response:
<result message="Action = create_index" messageKey="Action = create_index" status="SUCCESS" statusCode="0"/>