Search
Overview
| |
| |
|
The previously used x-use.shortreferences header is deprecated, but is still supported for backward compatibility.
Please use x-use-shortreferences
instead.
Descriptions
Search in store(s)
POST /api/content/search
Post information, e.g. Options, Sources and Terms, to find documents in stores. Change the amount of documents at a single page using the query parameter pagesize or ps. Change the total amount of documents for the search with query parameter maxhits or mh.
The redirected default entrypoint is "../results/{resultid}/pages/1". You can change the redirection to the info page using the query parameter firstpage=false.
Request
Query Parameters
Parameter Name | Short Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
textmarker | tm | Boolean | false | Determines whether textmarkers will be returned in the result set. | |
maxhits | mh | number | false | Defines the maximum hit list size. The default value is 2000. | |
pagesize | ps | number | false | Defines the size of the hits per hit list page. The default value is 50. | |
logout | Boolean | false | Logs out the user and closes the session. | ||
newestversion | nv | Boolean | false | false | Requests the newest version of the documents to be searched. |
Input
Property | Type | Required | Description |
|---|---|---|---|
stores | Array | true | The stores where the query is executed. |
columns | Array | false | The field names to be displayed in the hit list. The sort direction can be determined by prefixing the field name with a "+" (ascending) or a "-" (descending). See the example below. |
fulltext | String | false | The full text search term. |
conditions | Object | false | The search terms linked with AND. |
......or | Array | false | The search terms linked with the OR operator. The query is wrapped in parentheses. |
......and | Array | false | The condition contains the AND operator. The query is wrapped in parentheses. |
......not | Array | false | The condition contains the NOT operator. is wrapped in parentheses. |
......equals | Array | false | This field is used for exact compare conditions. "equals" with the specified field looks for expressions in exact same order. will only result in documents in which the field "animals" contains exactly "black cat". Therefor, "black cat crossing" will not be matching. |
......eq | Array | false | same as "equals" |
......// | Object | Number | Boolean | null | String | false | A very simple search term, i.e. {fieldname : search term} |
eql | String | false | For a search via EQL only the specification of the search string is required. The specification of further parameters like "stores" or "conditions" are not necessary. |
Examples:
The following example generates the EQL string:
[...] where fulltext('Impressum')
{ "stores": ["MANAGER"], "columns": ["Publikation", "Oberzeile", "AusgabeDatum", "Rubrik", "Titel"], "fulltext" : "Impressum"}The following example produces the EQL string:
[...] where Rubrik='Berlin' AND Zahl=17 AND bezahlt=false AND ISNULL('Fertigstellung)
{ "stores": ["MANAGER","Store01"], "columns": ["Publikation", "Oberzeile", "AusgabeDatum", "Rubrik", "Titel"], "conditions":{ "Rubrik" : "Berlin", "Zahl" : 17, "bezahlt" : false, "Fertigstellung" : null }}The following example produces the EQL string:
[...] where temperature=22 AND weather='mostly sunny'
{ "stores": ["MANAGER"], "columns": ["temperature", "weather", "location"], "conditions":{ "temperature" : 22, "weather" : { "equals" : "mostly sunny" } }}The following example generates the EQL string:
[...] where fulltext(ADAPTIVE, 'standard') AND (Rubrik='Berlin' AND (Publikation contains 'manager magazin' OR Oberzeile contains 'trends*'))
{ "stores": ["MANAGER"], "columns": ["Publikation", "Oberzeile", "AusgabeDatum", "Rubrik", "Titel"], "fulltext" : "standard", "conditions": { "Rubrik" : "Berlin", "or": [ {"Publikation": "manager magazin"}, {"Oberzeile": "trends*"} ] }}The following example generates the EQL string:
[...] where Publikation = 'manager magazin' AND NOT(Oberzeile contains 'trends*' OR Oberzeile contains 'Schlagzeile')"
{ "stores": ["MANAGER"], "columns": ["Publikation", "Oberzeile", "AusgabeDatum", "Rubrik", "Titel"], "conditions": { "and": [{ "Publikation": "manager magazin" }, { "not": [{ "or": [{ "Oberzeile": "trends*" }, { "Oberzeile": "Schlagzeile" } ] }] } ] }}{ "stores": ["MANAGER"], "columns": ["Publikation", "+Oberzeile", "-AusgabeDatum", "Rubrik", "Titel"], "fulltext": "standard", "conditions": { "Rubrik": "Berlin", "Zahl": 17, "bezahlt": false, "Fertigstellung": null, "or": [{ "Publikation": "manager magazin" }, { "not": [{ "Oberzeile": "Impressum" }, { "Rubrik": "trends*" }, { "or": [{ "Oberzeile": "BDI" }, { "Rubrik": "standar?" } ] }, { "and": [{ "Oberzeile": "Portrat*" }, { "AusgabeNr": { "range": [3, 10] } } ] } ] }, { "or": [{ "Titel": "Euro*" }, { "Ausgabedatum": { "range": ["2010-10-12T12:10:00", "2017-11-12T12:10:00"] } } ] } ] }}{ "eql": "Select ManagerSchema.temperature, ManagerSchema.weather, ManagerSchema.location from @MANAGER where ManagerSchema.temperature = 22 and ManagerSchema.weather = 'mostly sunny'"}Response
Returns
http 200 - OK, call successful.
http 303 - Redirect to the entrypoint "../results/{resultid}/info" or "../results/{resultid}/pages/1".
http 400 - Bad Request, occurs if any condition or operation within the server fails.
http 401 - Unauthorized if the authentication process has failed.
Information about the search (e.g. status, pageCount)
GET /api/content/results/{resultid}/info
Get all informations about the search (e.g. status, pageCount, columns with displayname)
Request
Query Parameters
Parameter Name | Type | Required | Description |
|---|---|---|---|
logout | Boolean | false | Logs out the user and closes the session. |
Response
Returns
http 200 - OK, call successful.
http 401 - Unauthorized if the authentication process has failed.
http 404 - Bad Request, result not found.
Data structure
Property | Type | Description |
|---|---|---|
resultId | String | The unique result ID of the specified search. |
completed | Boolean | A Boolean value. If true the search will be completed. |
pageCount | Number | The number of pages which has up to now been loaded. If completed is true, the pageCount will show the maximum number of pages. |
columns | Object | List of returned column fields. |
......// | String | Display name of the specified technical name. |
Get a single result list page
GET /api/content/results/{resultid}/pages/{pagenum}
Get a result list page with only 50 (default) documents. Allowed values for the page numbers are all numbers from 1 to pageCount value. In addition, you are allowed to use first and last to get the first or last page of the specified search.
Request
Query Parameters
Parameter Name | Type | Required | Description |
|---|---|---|---|
logout | Boolean | false | Logs out the user and closes the session. |
Returns Response
http 200 - OK, call successful.
http 204 - The server successfully processed the request and is not returning any content. No matching documents were found.
http 401 - Unauthorized if the authenfication process has failed.
http 404 - Bad Request, occurs if any condition or operation within the server fails.
Data structure
Property | Type | Description |
|---|---|---|
resultId | String | The unique result ID of the specified search. |
completed | Boolean | A Boolean value. If true the search will be completed. |
pageCount | Number | The number of pages which has up to now been loaded. If completed is true, the pageCount will show the maximum number of pages. |
page | Number | The current page number. |
items | Array | List of documents. |
......id | String | The document's unique ID. |
......fields | Object | The fields of a document. |
............// | String | Number | Boolean | Array | Array | Array | Object | The field's name and value pair. |
......types | Object | The types of the document fields. |
............// | String | Array | Field name and field type as a key/value pair. |
......attachments | Array | The attachments of a document. |
............fields | Object | The fields of the attachment if specified upon the file upload. |
............name | String | The name of the attachment. |
............length | Number | The file size of the attachment. |
............id | String | The id of the attachment. |
............contentType | String | The content type or mime type of the attachment. |
......textMarker | Object | Describes the position(s) of the found search term per field. |
............// | Array | An array of textmarkers for a single field. |