The Search API provides access to the search features of Alfresco Community Edition.
The Search API accepts POST requests containing JSON structures as described in the table below. The JSON is structured to group options related to different query concepts together.
The Search API is defined under the search namespace. It uses the /search endpoint, which does not accept any URL parameters and is therefore, completely controlled via the parameters in a POST body.
Note: The /search endpoint is available in Alfresco Community Edition
201911 GA and newer versions.
The elements used by the /search endpoint are:
Element | Type | Parameters | Description | Reference |
---|---|---|---|---|
query | string |
|
This specifies a basic query to be parsed with minimum possible query parameters. | See query. |
paging |
|
This restricts the number of results to be displayed. | See paging. | |
include | string | This returns additional information about the node. | See include. | |
includeRequest | boolean | When this element is set to true, the original request is included in the response. | See includeRequest. | |
fields | string | This specifies a list of field names. | See fields. | |
sort |
|
The sort element lets you sort the results of a query. | See sort. | |
templates |
|
This specifies the templates used for query expansion. | See sort. | |
defaults |
|
This specifies the common query defaults. | See defaults. | |
timezone | string | This specifies a valid timezone id supported by @see java.time.ZoneId. | See timezone. | |
filterQueries |
|
This specifies the constraints that apply to the results set but do not affect the score of each entry. | See filterQueries. | |
facetQueries |
|
This specifies the facet queries to include. | See facetQueries. | |
facetFields |
|
This specifies the simple facet fields to include. | See facetFields. | |
facetIntervals |
|
This specifies the facet intervals. | See facetIntervals. | |
pivots |
|
This specifies a list of pivot keys. | See pivots. | |
stats |
|
This specifies a list of stats request. | See stats. | |
spellcheck |
|
This specifies a request that spellcheck fragments to be added to result set rows. | See spellcheck. | |
scope |
|
This specifies the scope or the locations that are queried. | See scope. | |
limits |
|
This limits the time and resources used for query execution. | See limits. | |
highlight |
|
This specifies the request that highlight fragments to be added to the result set rows. | See highlight. | |
range |
|
This is useful for stitching together a series of range queries on any date or numeric field that supports range queries. | See range. |
Note: The POST response in the examples used for various elements is only a part of the full result
returned by the query. For detailed information, see the Search API Postman
collection.
Note: Limited stats are available with Solr 4 as compared to Solr 6. So, the Solr 4 response may
be different from the Solr 6 response. Also, there are some differences between the default Solr
4 core and the rerank core. The rerank core is the default core with Solr 6 but you can also use
it with Solr 4.
Note: It is advisable to use a Swagger-aware editor.