http://ec2-54-69-67-21.us-west-2.compute.amazonaws.com/search
You can communicate with REST server can by POSTing or constructing a URL with the parameters encoded. This means you can easly construct a request that will work directly from your web browser, or embedded in your application. There is no dependency on SOAP web service libraries.
This solution is designed to accept query input as either GET or POST attributes to the URL: http://server[:port]/search
The available search options are as follows:
Option | Description |
---|---|
IW_INDEX | Semicolon delimitated list of content sources (indexes) to search |
IW_FIELD_TEXT | Specifies the query to execute using the Perceptive Enterprise Search query syntax |
IW_FIELD_WEB_STYLE | Specifies the query to execute using a more Internet style search syntax. |
IW_FIELD_NATURAL_LANGUAGE | Specifies the query to execute using a natural language format. |
IW_SORT | The sort method to use. Can be relevance, date or any metdata field. |
IW_BATCHSIZE | The number of items per page. |
IW_CONFLATION | The level of conflation (stemming) to use in the search, can be Broad, Narrow, Plurals of Off. |
Please note there is a complete list of options in the Perceptive Enterprise Search help.
To implement advanced search style forms, you may also use IW_FIELD_IN_FIELDNAME, to constrain the query to a particular field.
For example, to search for all documents authored by Peter Abbot about Dugongs, the URL would be:
?IW_INDEX=TRIM&IW_FIELD_WEB_STYLE=dugong&IW_FIELD_IN_AUTHOR=Peter+Abbot
<response code="200">
<nextpage>/url_to_next_page?page=2</nextpage>
<pageurl>/url_to_next_page?page=%PAGENUM%</pageurl>
<error></error>
<resultlist start="1" count="10" total="2321" hitcount="12021">
<result>
<filename></filename>
<summary></summary>
<date></date>
<size></size>
<title></title>
<url></url>
<textview></textview>
<download></download>
<collection></collection>
<format code=""></format>
<category></category>
<score></score>
<metadata>
<result>
<text></text>
<count></count>
</result>
</metadata>
<related>
<result>
<title></title>
<url></url>
</result>
</related>
</result>
</resultlist>
<spelling>
<text></text>
<url></url>
</spelling>
<refinements>
<section name="Are you looking for?" type="lookingfor">
<result>
<text>?</text>
<count></count>
<url></url>
</result>
</section>
<section name="Categories" type="category">
<result>
<text>?</text>
<count>?</count>
<url></url>
</result>
</section>
<section name="Metadata Field" type="metadata:fieldname">
<result>
<text></text>
<count></count>
<url></url>
</result>
</section>
<section name="People" type="entity:people">
<result>
<text></text>
<count></count>
<url></url>
</result>
</section>
<section name="Locations" type="entity:location">
<result>
<text></text>
<count></count>
<url></url>
</result>
</section>
<section name="WebSites" type="entity:website">
<result>
<text></text>
<count></count>
<url></url>
</result>
</section>
<section name="Organizations" type="entity:organization">
<result>
<text></text>
<count></count>
<url></url>
</result>
</section>
<section name="Emails" type="entity:email">
<result>
<text></text>
<count></count>
<url></url>
</result>
</section>
</refinements>
</response>
The response is broken down into two distinct sections, the found results for the executed search <resultlist>; and the refinement options for the executed search <refinement>. The default server website currently renders the results in the left-hand section of the screen with around 70% of the real estate and the refinement to the right with 30% of the real estate.
The <response> node is the top level node of the XML response; it has a single attribute of "code" indicating the status. The code may be:
The response node can have one of each of the following nodes:
Node | Description |
---|---|
<resultlist> | contains the found results for the executed search |
<error> | contains any error text if the search did not execute |
<refinement> | contains the refinement options for the executed search |
<spelling> | contains spelling suggestion if one is available |
<nextpage> | contains the URL to fetch the next page of results |
<pageurl> | contains a template that can be used to navigate to a specific result page, replace %PAGENUM% with the page you wish to seek to |
The <resultlist> node contains one or more <result> nodes representing the found items in the result set.
The <resultlist> node can have the following attributes:
Attribute | Description |
---|---|
start | Indicates the index of the first item in the result list, starting from 1. |
count | Indicates the number of items returned in this request. |
total | Indicates the total number of items found by this search. |
hitcount | Indicates the total number of search terms found in this search. |
The <result> node represents a single item found in the result list, its children nodes contain data about the document. The <result> node can have one of each of the following:
Attribute | Description |
---|---|
filename | The filename of the result, as reported by the original document repository |
summary | Abstract with the found keywords highlighted |
date | The date of the document, when available, will be in the format of yyyy-mm-dd hh:mm:ss |
title | The stored title of the document |
url | A URL that can be used to download the original (native) document |
textview | A URL that can be used to download a HTML text view of the document, with hits highlighted |
download | A URL that can be used to download the binary document when available |
collection | The index where the document was found |
format | The format of the document, the code attribute will contain the document format code, the text of the node will contain the display name |
category | The category in which this document belongs |
score | The calculated relevance score of the document, between 1 and 100 |
metadata | Contains a collection of metadata stored for the document |
The refinement node contains a collection of refinement options available on this result list; each option is separated into its own <section> node. The current sections are:
Node | Description |
---|---|
<section type="lookingfor"> | Are you looking for? |
<section type="category"> | Categories |
<section type="metadata:fieldname"> | Metadata refinement options, the fieldname after the colon will contain the stored metadata field. |
<section type="entity:entitytype"> | Entities, broken down by people, location, organization, website and email |
Each <section> node will have one or more <result> nodes.
Node | Description |
---|---|
<text> | Contains the alternate query text |
<url> | Contains the URL that can be used to return the XML results based on the alternate query |
The error node will be present if the response code is 500. This will indicate the reason that the search failed, this may include:
The next page node contains the URL that can be used to fetch the next page of results for this query.
The page URL node contains a template that can be used to navigate to a specific page in the result set. For example, if you wish to jump straight to page 10. To use, do a string replace on "%PAGENUM%" with the page you wish to jump to.