Let the platform do the work

/globalsearch GET

Overview

Global search

Summary

This endpoint exposes the global search capability using solely the Elasticsearch backend as an alternative to the /search endpoint. This endpoint can be used with a long list of request arguments. Instead of using GET request arguments, all described arguments can be used inside a JSON encoded request body using a the GET request. If your client has no support for GET requests with a body, the POST method can be used as an alternative.

Request Arguments

Name Type Description Required
q String The search expression. Multiple terms can be specified at once. All enabled fields will be searched in. The results are ordered by relevance which is based on a multitude of settings based on token counts, hit ratio, (weighted) boost values and type of field. Currently no operators are supported in the search expression itself. By refining the search expression more relevant results will be returned as top results. If no search expression is given results are returned based on last modified date. False
module_list String Comma delimited list of modules to search. If omitted, all search enabled modules will be queried. Note that when consuming the endpoint /:module/globalsearch that this parameter is ignored.
Example: Accounts,Contacts
False
max_num Integer A maximum number of records to return. Default is 20. False
offset Integer The number of records to skip over before records are returned. Default is 0. False
highlights Boolean Wether or not to return highlighted results. Default is true. False
sort Array Define the sort order of the results. By default the results are returned by relevance which is the preferred approach. Using this argument any search enabled field can be used to sort on. Keep in mind the not sorting by relevance may have a negative performance impact.
Example: {"date_modified":"desc","name":"asc"}
False

Request

{
}

Response Arguments

Name Type Description
next_offset Integer Displays the next offset for retrieval of additional results. -1 will be returned when there are no more records.
records Array An array of results containing matched records.

Response

{
}

Change Log

Version Change
v10 Added /globalsearch GET/POST endpoint.
v10 Added /:module/globalsearch GET/POST endpoint.