Smart search

This hot topic RESTful API is used to get the search results suggested by Smart Analytics.

Request:

POST http://<SM Server Address>:13080/SM/9/rest/SmartAnalytics/1/action/smartsearch

An example of the request body:

{
  SmartAnalytics:{
    in:'{keyword: "test",  start:1, pagesize:2}',
  }
}
 

Response example:

Note You can ignore the messages in the response as these messages are printed by the Restful framework.

{
    "Messages": [
        "Invalid syntax for query.  Failed parsing",
        "in=\"1\"",
        "Invalid syntax for query.  Failed parsing",
        "in=\"1\""
    ],
    "ReturnCode": -1,
    "SmartAnalytics": {
        "in": "{keyword: \"test\",  start:1, pagesize:2}",
        "out": "<autnresponse xmlns:autn=\"http://schemas.autonomy.com/aci/\"><action>QUERY</action><response>SUCCESS</response><responsedata>\n<autn:numhits>2</autn:numhits><autn:totalhits>18</autn:totalhits><autn:totaldbdocs>346</autn:totaldbdocs><autn:totaldbsecs>346</autn:totaldbsecs><autn:hit><autn:reference>scactivelink%3A%2F%2Fkmdocument%3Aid%3D%26quot%3BKM0580%26quot%3B%26nbsp%3Band%26nbsp%3Bkbname%3D%26quot%3BKnowledge_Library%26quot%3B</autn:reference><autn:id>1588</autn:id><autn:section>0</autn:section><autn:weight>57.09</autn:weight><autn:links>TEST</autn:links><autn:database>Knowledge_Library</autn:database><autn:title>test error message by Jora(Title)</autn:title><autn:summary>&lt;_em_&gt;test&lt;/_em_&gt; error message by Jora(Title). 2015/06/22 14:07:46. falcon. external. errormsg. &lt;_em_&gt;test&lt;/_em_&gt; error message by Jora(Error Message). &lt;_em_&gt;test&lt;/_em_&gt; error message by Jora(cause). &lt;_em_&gt;test&lt;/_em_&gt; error message by Jora(Wordaround/Fix).</autn:summary><autn:content><DOCUMENT><KMSEARCHCATEGORY>KM01CAT:KM03CAT:KM05CAT</KMSEARCHCATEGORY><KMSTATUS>external</KMSTATUS><DOCTYPE>errormsg</DOCTYPE><ID>KM0580</ID><SYSMODTIME_DATE>2015/06/22 14:47:00</SYSMODTIME_DATE><CATEGORY>Service Manager&gt;Knowledge Management&gt;Document Maintenance and Lifecycle;</CATEGORY><DRETITLE>test error message by Jora(Title)</DRETITLE></DOCUMENT></autn:content></autn:hit><autn:hit><autn:reference>scactivelink%3A%2F%2Fkmdocument%3Aid%3D%26quot%3BKM0580%26quot%3B%26nbsp%3Band%26nbsp%3Bkbname%3D%26quot%3BKnowledge_Library%26quot%3B</autn:reference><autn:id>1588</autn:id><autn:section>0</autn:section><autn:weight>57.09</autn:weight><autn:links>TEST</autn:links><autn:database>Knowledge_Library</autn:database><autn:title>test error message by Jora(Title)</autn:title><autn:summary>&lt;_em_&gt;test&lt;/_em_&gt; error message by Jora(Title). 2015/06/22 14:07:46. falcon. external. errormsg. &lt;_em_&gt;test&lt;/_em_&gt; error message by Jora(Error Message). &lt;_em_&gt;test&lt;/_em_&gt; error message by Jora(cause). &lt;_em_&gt;test&lt;/_em_&gt; error message by Jora(Wordaround/Fix).</autn:summary><autn:content><DOCUMENT><KMSEARCHCATEGORY>KM01CAT:KM03CAT:KM05CAT</KMSEARCHCATEGORY><KMSTATUS>external</KMSTATUS><DOCTYPE>errormsg</DOCTYPE><ID>KM0580</ID><SYSMODTIME_DATE>2015/06/22 14:47:00</SYSMODTIME_DATE><CATEGORY>Service Manager&gt;Knowledge Management&gt;Document Maintenance and Lifecycle;</CATEGORY><DRETITLE>test error message by Jora(Title)</DRETITLE></DOCUMENT></autn:content></autn:hit><autn:engines><autn:used>0</autn:used><autn:unused>1</autn:unused></autn:engines><autn:warning>Engine 0: Engine 0: At least one of the fields in a parameter (probably 'printfields') does not exist</autn:warning><autn:warning>Engine 0: Engine 0: One of the fields used in the field text does not exist</autn:warning><autn:warning>Engine 0: Engine 0: The languagetype of the text could not be determined. The default languagetype was used.</autn:warning><autn:warning>Engine 0: Engine 1: At least one of the fields in a parameter (probably 'printfields') does not exist</autn:warning><autn:warning>Engine 0: Engine 1: One of the fields used in the field text does not exist</autn:warning><autn:warning>Engine 0: Engine 1: The languagetype of the text could not be determined. The default languagetype was used.</autn:warning></responsedata></autnresponse>"
    }
}