Support Menu

Interface IQueryResult

The IQueryResult interface describes a single result returned by the Coveo REST Search API.

Index

Properties

childResults

childResults: IQueryResult[]

Contains the child results if parent-child loading was performed.

See the Folding component.

clickUri

clickUri: string

Contains the clickable URI of the document, which you can set on an href in your search interface.

See the ResultLink document.

excerpt

excerpt: string

Contains the excerpt of the document. Can be empty for certain types of documents (e.g., images, videos, etc.).

See the Excerpt component.

flags

flags: string

Contains the list of flags that the document has. Each value is separated by a semicolon (;).

hasHtmlVersion

hasHtmlVersion: boolean

Contains a value specifying whether the document has an HTML version.

See the Quickview component.

Optional index

index: number

Contains the 0-based index value of the result, as returned by the Coveo REST Search API.

isRecommendation

isRecommendation: boolean

Contains a value that specifies whether the result was recommended by the Coveo Machine Learning service.

See Coveo Machine Learning.

Optional parentResult

parentResult: IQueryResult

Contains the parent result if parent-child loading was performed.

See the Folding component.

printableUri

printableUri: string

Contains a printable URI (or path) to the document.

Optional queryUid

queryUid: string

Contains The query UID, as returned by the Coveo REST Search API.

This value is used mainly for usage analytics.

The Coveo JavaScript Search Framework adds this property client-side to each result.

rankingInfo

rankingInfo: string

Contains a ranking information which is returned along the document if IQuery.debug is true.

Optional rating

rating: number

Contains the rating of the document.

See the ResultRating component.

raw

raw: any

Contains the raw field values of the document, expressed as key-value pairs.

searchInterface

searchInterface: SearchInterface

The SearchInterface inside which this result is rendered.

This value is used mainly to allow for conditional rendering of results templates.

The Coveo JavaScript Search Framework adds this property client-side to each result.

state

state: object

Contains the query state of the SearchInterface inside which this result is rendered.

This value is used mainly to allow for conditional rendering of results templates.

The Coveo JavaScript Search Framework adds this property client-side to each result.

Type declaration

  • [attribute: string]: any

title

title: string

Contains the title of the document

uniqueId

uniqueId: string

Contains a unique ID for the document.

This parameter is useful when making certain calls to a SearchEndpoint.

uri

uri: string

Contains the URI of the document.

Hierarchy

  • IQueryResult