You are here

Search API

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
  • language
  • userQuery
  • query
This specifies a basic query to be parsed with minimum possible query parameters. See query.
  • maxItems
  • skipCount
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.
  • type
  • field
  • ascending
The sort element lets you sort the results of a query. See sort.
  • name
  • template
This specifies the templates used for query expansion. See sort.
  • textAttributes
  • defaultFTSOperator
  • defaultFTSFieldOperator
  • namespace
  • defaultFieldName
This specifies the common query defaults. See defaults.
timezone string   This specifies a valid timezone id supported by @see java.time.ZoneId. See timezone.
  • query
  • tags
This specifies the constraints that apply to the results set but do not affect the score of each entry. See filterQueries.
  • query
  • label
This specifies the facet queries to include. See facetQueries.
  • field
  • label
  • prefix
  • sort
  • method
  • missing
  • limit
  • offset
  • mincount
  • facetEnumCacheMinDf
  • excludeFilters
This specifies the simple facet fields to include. See facetFields.
  • sets
  • intervals
This specifies the facet intervals. See facetIntervals.
  • key
This specifies a list of pivot keys. See pivots.
  • field
  • label
  • min
  • max
  • sum
  • count
  • missing
  • mean
  • stddev
  • sumOfSquares
  • distinctValues
  • countDistinct
  • cardinality
  • cardinalityAccuracy
  • excludeFilters
  • percentiles
This specifies a list of stats request. See stats.
  • query
This specifies a request that spellcheck fragments to be added to result set rows. See spellcheck.
  • locations
This specifies the scope or the locations that are queried. See scope.
  • permissionEvaluationTime
  • permissionEvaluationCount
This limits the time and resources used for query execution. See limits.
  • prefix
  • postfix
  • snippetCount
  • fragmentSize
  • maxAnalyzedChars
  • mergeContiguous
  • usePhraseHighlighter
  • fields
This specifies the request that highlight fragments to be added to the result set rows. See highlight.
  • range
  • start
  • end
  • gap
  • hardend
  • include
  • other
  • method
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.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.