# Interface IQueryResults

Describe a set a results returned by the Search API

## Index

### Properties

- advancedExpression
- apiVersion
- basicExpression
- categoryFacets
- clientDuration
- constantExpression
- duration
- error
- exception
- executionReport
- facets
- groupByResults
- indexDuration
- phrasesToHighlight
- pipeline
- proxyDuration
- queryCorrections
- rankingExpressions
- refinedKeywords
- results
- searchAPIDuration
- searchUid
- splitTestRun
- termsToHighlight
- totalCount
- totalCountFiltered
- triggers
- userIdentities

## Properties

### Optional advancedExpression

advancedExpression: string

- Defined in rest/QueryResults.ts :49

The advanced expression that was executed.
Only sent if IQuery.debug is true

### Optional apiVersion

apiVersion: number

- Defined in rest/QueryResults.ts :108

The search api version that was used for this query.

### Optional basicExpression

basicExpression: string

- Defined in rest/QueryResults.ts :44

The basic expression that was executed.
Only sent if IQuery.debug is true

### categoryFacets

categoryFacets: ICategoryFacetResult[]

- Defined in rest/QueryResults.ts :128

Category facet results of the query

### clientDuration

clientDuration: number

- Defined in rest/QueryResults.ts :96

The duration of the query for the client.

deprecated

  Use searchAPIDuration instead.

### Optional constantExpression

constantExpression: string

- Defined in rest/QueryResults.ts :54

The constant expression that was executed.
Only sent if IQuery.debug is true

### duration

duration: number

- Defined in rest/QueryResults.ts :76

The total query duration, which is the sum of the `indexDuration` and `searchAPIDuration`, including any latency incurred through the necessary network hops.

### Optional error

error: object

- Defined in rest/QueryResults.ts :19

When an error occurs, and the errorsAsSuccess flag is passed, the error will be returned in the body of the response

#### Type declaration

- ##### executionReport: any

  A detailed execution report sent by the Search API

- ##### message: string

  The error message

- ##### type: string

  The type of error

### Optional exception

exception: IQueryException

- Defined in rest/QueryResults.ts :116

The exception that can be returned by the index if the query triggered an error

### Optional executionReport

executionReport: any

- Defined in rest/QueryResults.ts :39

A detailed execution report sent by the Search API.
Only sent if IQuery.debug is true

### Optional facets

facets: IFacetResponse[]

- Defined in rest/QueryResults.ts :154

Facet results of the query

### groupByResults

groupByResults: IGroupByResult[]

- Defined in rest/QueryResults.ts :124

The group by results of the query

### indexDuration

indexDuration: number

- Defined in rest/QueryResults.ts :80

The part of the total query `duration` that was spent in the index.

### phrasesToHighlight

phrasesToHighlight: object

- Defined in rest/QueryResults.ts :140

Phrases to highlight (with stemming) in the results

#### Type declaration

- ##### [originalTerm: string]: string[]

### Optional pipeline

pipeline: string

- Defined in rest/QueryResults.ts :104

The pipeline that was used for this query.

### Optional proxyDuration

proxyDuration: number

- Defined in rest/QueryResults.ts :90

The duration of the query on the proxy (not always applicable, can be optional)

deprecated

  Use duration, indexDuration and searchAPIDuration instead.

### queryCorrections

queryCorrections: IQueryCorrection[]

- Defined in rest/QueryResults.ts :132

Possible query corrections (eg : DidYouMean)

### Optional rankingExpressions

rankingExpressions: IRankingExpression[]

- Defined in rest/QueryResults.ts :64

A list of ranking expression that were used to tweak the relevance.
Only sent if IQuery.debug is true

### Optional refinedKeywords

refinedKeywords: string[]

- Defined in rest/QueryResults.ts :148

The keywords selected by Coveo Machine Learning Refined Query feature

### results

results: IQueryResult[]

- Defined in rest/QueryResults.ts :120

The results of the query

### searchAPIDuration

searchAPIDuration: number

- Defined in rest/QueryResults.ts :84

The part of the total query `duration` that was spent in the Coveo Search API.

### Optional searchUid

searchUid: string

- Defined in rest/QueryResults.ts :100

A unique identifier for this query, used mainly for the Analytics service.

### Optional splitTestRun

splitTestRun: string

- Defined in rest/QueryResults.ts :112

The split test run that was used for this query. (A/B tests feature of the Coveo Query Pipeline)

### termsToHighlight

termsToHighlight: object

- Defined in rest/QueryResults.ts :136

Terms to highlight (with stemming) in the results

#### Type declaration

- ##### [originalTerm: string]: string[]

### totalCount

totalCount: number

- Defined in rest/QueryResults.ts :68

The total number of results that matched the query in the index.

### totalCountFiltered

totalCountFiltered: number

- Defined in rest/QueryResults.ts :72

The total number of results that matched the query in the index, but with the duplicate filtered.

### triggers

triggers: ITrigger<any>[]

- Defined in rest/QueryResults.ts :144

The Coveo Query Pipeline triggers, if any were configured.

### Optional userIdentities

userIdentities: IUserIdentity[]

- Defined in rest/QueryResults.ts :59

A list of user identities that were used to perform this query.
Only sent if IQuery.debug is true

### Hierarchy

- IQueryResults