Search REST API endpoint
Disclaimer: This endpoint documentation is generated from the latest Sitevision version. It might differ from the actual Sitevision environment where your website resides.
Use the RestApi utility of the Public API for server-side access of this endpoint.
Search
Queries a search index.
Applicable to: sv:nodeIndex, sv:applicationIndex of the sv:indexRepository.
GET
Returns an array of search hits based on a Solr query.
Index of type sv:applicationIndex has restricted access:
-
The UserIdentity sv:applicationIndex requires the feature "social collaboration" and that social collaboration
is enabled on the sv:site.
- External invocations requires that the caller is authenticated and authorized to READ on the sv:site.
- Server-side invocations (i.e. via the Public API RestApi utility) requires that the caller is authorized to READ on the sv:site.
-
The UGC sv:applicationIndex requires the feature "social collaboration" and that social collaboration
is enabled on the sv:site.
- External invocations requires that the caller is authenticated and authorized to READ on the sv:site.
- Server-side invocations (i.e. via the Public API RestApi utility) requires that the caller is authorized to READ on the sv:site.
- The User sv:applicationIndex requires that the caller is authorized to MANAGE_USERS on the sv:site.
Index of type sv:nodeIndex has no explicit access restrictions.
A search result will only contain search hits that the caller is authorized to READ.
| Name | Type | Default | Description |
|---|---|---|---|
| query | string |
A valid Solr query | |
| filterQuery | string |
A valid Solr query | |
| fields | array |
An array of fields to include in the result | |
| sortFields | array |
An array of objects with name (string) and sort order (boolean) [
{
"name": "name.sortable",
"desc": true
}
]
|
|
| skip | number |
0 | Skips leading number of hits. (The skip value must be zero or positive. A negative value will be treated as zero) |
| limit | number |
10 | Limits number of hits to return. (Since 2022.10.2: the limit value must be in range [1..500]. A value that is out of range will be trimmed into range) |
Example input
{
"query": "+name.analyzed:(magnus robin) +title.analyzed:developer",
"filterQuery": "+svtype:page",
"limit": 5,
"fields": [
"id", "name", "title"
],
"sortFields": [
{
"name": "name.sortable",
"desc": false
},
{
"name": "title.sortable",
"desc": false
}
]
}
Did you find the content on this page useful?