Update XML Document

Adds a XML document to the Solr index.

Resource Information

This service uses the tomcat application on port 8080 by default. To see a list of default ports click here

The context for this API is /crafter-search, please prefix the API URLs with this context.

HTTP Verb
POST
URL
/api/2/search/update
Response Formats
JSON

Parameters

Name
Type
Required
Description
index_id
String

The index ID
site
String
The site name
id
String
The document ID
strip_root
Boolean
Remove the root node from field names
token
String
The access token.

The access token could be optional depending on the configuration.

Example

Request

POST .../api/2/search/update?index_id=editorial&site=editorial&id=%2Fsite%2Fwebsite%2Farticles%2F2017%2F1%2Fwomen-styles-for-winter%2Findex.xml&token=myAccessToken
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="UTF-8"?>
  <page>
    <content-type>/page/article</content-type>        <display-template>/templates/web/pages/article.ftl</display-template>
    <merge-strategy>inherit-levels</merge-strategy>
    <objectGroupId>07fc</objectGroupId>
    <objectId>07fc5ac7-05ea-b038-6455-26f895ba8822</objectId>
    <sections>        <item>  <section_html>&lt;p&gt;Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean rhoncus, nulla ut mattis tempor, lorem arcu malesuada purus, sit amet pretium diam ligula at ante. Suspendisse potenti. Aliquam erat volutpat. Donec finibus, lectus et scelerisque euismod, est orci fermentum risus, a ullamcorper nisi tellus pellentesque eros. Maecenas vitae dui fringilla, porttitor ipsum eget, blandit felis. Nunc a eleifend velit,
    posuere vulputate dolor. Nam semper porttitor laoreet. Nunc sodales eget nisl eget lobortis.&lt;/p&gt;
    &lt;p&gt;Maecenas ligula mi, aliquet eu rhoncus ut, consectetur in nulla. Etiam sed venenatis sapien. Aenean ullamcorper, turpis vitae interdum malesuada, turpis leo interdum nisi, a placerat sem dui at justo. Aliquam a lobortis orci. Etiam eget vestibulum turpis, ac pulvinar nunc. Morbi id risus ante. Nulla rhoncus feugiat odio, ac accumsan ante scelerisque ut. Phasellus porttitor turpis vel enim dignissim auctor.&lt;/p&gt;
    &lt;p&gt;Donec ut rutrum nisl. Donec facilisis condimentum neque sit amet viverra. Donec nec tellus vitae dui bibendum tristique sed ac ante. Quisque ullamcorper nibh ipsum, vitae feugiat ex sagittis sed. Nullam pharetra massa lorem. Aliquam vitae ex vel massa lobortis elementum. In lorem elit, hendrerit eu scelerisque eu, dignissim eget est. Donec pharetra eget eros vitae fermentum. Suspendisse potenti.&lt;/p&gt;</section_html>
    </item></sections>
    <file-name>index.xml</file-name>
    <folder-name>coffee-is-good-for-your-health</folder-name>
    <header/>
    <internal-name>Coffee is Good for Your Health</internal-name>
    <title>Coffee is Good for Your Health</title>
    <subject>Coffee is Good for Your Health</subject>
    <author>John Doe</author>
    <categories>      <item>  <key>health</key>
    <value_smv>Health</value_smv>
    </item></categories>
    <segments>        <item>  <key>guy</key>
    <value_smv>Guy</value_smv>
    </item>   <item>  <key>gal</key>
    <value_smv>Gal</value_smv>
    </item></segments>
    <date_dt>06/14/2016 04:00:00</date_dt>
    <createdDate>3/2/2017 20:41:3</createdDate>
    <createdDate_dt>3/2/2017 20:41:3</createdDate_dt>
    <lastModifiedDate>3/14/2017 23:52:40</lastModifiedDate>
    <lastModifiedDate_dt>3/14/2017 23:52:40</lastModifiedDate_dt>
    <featured_b>false</featured_b>
    <summary>Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Aenean rhoncus, nulla ut mattis tempor, lorem arcu malesuada purus, sit amet pretium diam ligula at ante. Suspendisse potenti.</summary><image>/static-assets/images/coffee-pic.jpg</image>
  </page>

Response

Status 200 OK

{
  "message": "OK"
}

Responses

Status
Location
Response Body
200
.../api/2/search/update
See example above.
500

{ "message" : "Internal server error" }
503

{ "message" : "Service unavailable, please try again later" }