Deletes a subscription.
The subscription to delete.
An additional set of options to use for this call.
The options injected by the applied decorators.
Exchanges a temporary handshake token to either get an initial access token or extend the privileges of an existing access token.
The access token.
Lists all available query extensions for the search endpoint.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of the extensions.
Searches through the values of a facet.
The request for which to search through the values of a facet.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of facet search results.
Performs a search on the index and returns a Promise of ArrayBuffer
.
The query to execute. Typically, the query object is built using a
QueryBuilder
.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of query results.
Follows an item, or a query result, using the search alerts service.
The subscription details.
An additional set of options to use for this call.
The options injected by the applied decorators.
Gets the URI that can be used to authenticate against the given provider.
The provider name.
The URI to return to after the authentication is completed.
The authentication message.
Additional set of options to use for this call.
Options injected by the applied decorators.
The authentication provider URI.
Gets the base URI of the search alerts endpoint.
The base URI of the search alerts endpoint.
Gets the base URI of the Search API endpoint.
The base URI of the Search API endpoint.
Gets a single item, using its uniqueId
.
Typically, the IQueryResult.uniqueId on each result.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of the item.
Gets the content for a single item, as an HTMLDocument (think: quickview).
Typically, the IQueryResult.uniqueId on each result.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of the item content.
Gets the content of a single item, as text (think: quickview).
Typically, the IQueryResult.uniqueId on each result.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of the item content.
The query for which to get the XLSX result set.
The number of results to download.
An additional set of options to use for this call.
The options injected by the applied decorators.
The download URI.
Gets a list of query suggestions for a request.
The query, and the number of suggestions to return.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of query suggestions.
Gets the raw datastream for an item. This is typically used to get a thumbnail for an item.
Returns an array buffer.
Example:
let rawBinary = String.fromCharCode.apply(null, new Uint8Array(response));
img.setAttribute('src', 'data:image/png;base64,' + btoa(rawBinary));
Typically, the IQueryResult.uniqueId on each result.
Normally, $Thumbnail
.
An additional set of options to use for this call.
The options injected by the applied decorators.
Gets an URL from which it is possible to see the datastream for an item. This is typically used to get a thumbnail for an item.
Typically, the IQueryResult.uniqueId on each result.
Normally, $Thumbnail
.
An additional set of options to use for this call.
The options injected by the applied decorators.
The datastream URL.
Gets an URL from which it is possible to see a single item content, as HTML (think: quickview).
Typically, the IQueryResult.uniqueId on each result.
An additional set of options to use for this call.
The options injected by the applied decorators.
The URL.
Indicates whether the search endpoint is using JSONP internally to communicate with the Search API.
true
in the search enpoint is using JSONP; false
otherwise.
Lists the possible field values for a request.
The request for which to list the possible field values.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of the field values.
Lists the possible field values for a request.
The request for which to list the possible field values.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of the field values.
Lists all fields for the index, and returns an array of their descriptions.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of the index fields and descriptions.
Gets a Promise of an array of the current subscriptions.
The page of the subscriptions.
An additional set of options to use for this call.
The options injected by the applied decorators.
Gets the plan of execution of a search request, without performing it.
The query to execute. Typically, the query object is built using a
QueryBuilder
.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of plan results.
Note:
The Coveo Cloud V2 platform does not support collaborative rating. Therefore, this method is obsolete in Coveo Cloud V2.
Rates a single item in the index (granted that collaborative rating is enabled on your index)
The item id, and the rating to add.
An additional set of options to use for this call.
The options injected by the applied decorators.
Performs a search on the index and returns a Promise of IQueryResults
.
This method slightly modifies the query results by adding additional information to each result (id, state object, etc.).
The query to execute. Typically, the query object is built using a
QueryBuilder
.
An additional set of options to use for this call.
The options injected by the applied decorators.
A Promise of query results.
Sets a function which allows external code to modify all endpoint call parameters before the browser sends them.
Note:
This is useful in very specific scenarios where the network infrastructure requires special request headers to be added or removed, for example.
The function.
Tags a single item.
The item id, and the tag action to perform.
An additional set of options to use for this call.
The options injected by the applied decorators.
Updates a subscription with new parameters.
The subscription to update with new parameters.
An additional set of options to use for this call.
The options injected by the applied decorators.
Configures a search endpoint on a Coveo Cloud V1 index.
The organization ID of your Coveo Cloud index.
The token to use to execute query. If not specified, you will likely need to login when querying.
The URI of the Coveo Cloud REST Search API. By default, this points to the production environment.
A set of additional options to use when configuring this endpoint.
Configures a new search endpoint on a Coveo Cloud V2 organization.
The unique identifier of the target Coveo Cloud V2 organization (e.g., mycoveocloudv2organizationg8tp8wu3
).
The access token to authenticate Search API requests with (i.e., an API key or a search token).
Note: This token will also authenticate Usage Analytics Write API requests if the search interface initializes an Analytics
component whose token
option is unspecified.
The base URI of the Search API.
Allowed values:
https://platform.cloud.coveo.com/rest/search
(for organizations in the standard Coveo Cloud V2 environment)https://platform-eu.cloud.coveo.com/rest/search
(for organizations with European data residency)https://platform-au.cloud.coveo.com/rest/search
(for organizations with Australian data residency)https://platformhipaa.cloud.coveo.com/rest/search
(for HIPAA organizations)Default: https://platform.cloud.coveo.com/rest/search
Additional options to apply for this endpoint (e.g., a renewAccessToken
function).
Configures a search endpoint on a Coveo on-premise index.
The URI of your Coveo Search API endpoint (e.g., http://myserver:8080/rest/search
)
The token to use to execute query. If not specified, you will likely need to login when querying (unless your Coveo Search API endpoint is configured using advanced auth options, such as Windows auth or claims).
A set of additional options to use when configuring this endpoint.
Configures a demo search endpoint on a Coveo Cloud V1 organization whose index contains various types of non-secured items.
Note: This method mainly exists for demo and testing purposes.
Additional options to apply for this endpoint.
Configures a demo search endpoint on a Coveo Cloud V2 organization whose index contains various types of non-secured items.
Note: This method mainly exists for demo and testing purposes.
Additional options to apply for this endpoint.
A map of all initialized SearchEndpoint
instances.
Example: Coveo.SearchEndpoint.endpoints["default"]
returns the default endpoint that was created at initialization.
Creates a new SearchEndpoint
instance.
Uses a set of adequate default options, and merges these with the options
parameter.
Also creates an EndpointCaller
instance and uses it to communicate with the endpoint
internally.
The custom options to apply to the new SearchEndpoint
.
The
SearchEndpoint
class allows the framework to perform HTTP requests against the Search API (e.g., searching, getting query suggestions, getting the HTML preview of an item, etc.).Note:
When writing custom code that interacts with the Search API, be aware that executing queries directly through an instance of this class will not trigger any query events.
In some cases, this may be what you want. However, if you do want query events to be triggered (e.g., to ensure that standard components update themselves as expected), use the
queryController
instance instead.JavaScript Search Framework Endpoint