# Class QueryBuilder

## Index

### Methods

- addContext
- addContextValue
- addFieldsToExclude
- addFieldsToInclude
- build
- computeCompleteExpression
- computeCompleteExpressionExcept
- computeCompleteExpressionParts
- computeCompleteExpressionPartsExcept
- containsEndUserKeywords

### Properties

- actionsHistory
- advancedExpression
- allowQueriesWithoutKeywords
- categoryFacets
- childField
- commerce
- constantExpression
- context
- disjunctionExpression
- enableCollaborativeRating
- enableDebug
- enableDidYouMean
- enableLowercaseOperators
- enablePartialMatch
- enableQuerySyntax
- enableQuestionMarks
- enableWildcards
- excerptLength
- expression
- facetOptions
- facetRequests
- filterField
- filterFieldRange
- firstResult
- groupByRequests
- longQueryExpression
- maximumAge
- numberOfResults
- parentField
- partialMatchKeywords
- partialMatchThreshold
- pipeline
- queryFunctions
- rankingFunctions
- recommendation
- searchHub
- sortCriteria
- sortField
- tab
- userActions

## Methods

### addContext

- addContext(values: object): void

- - Defined in ui/Base/QueryBuilder.ts :511

  #### Parameters

  - ##### values: object

    - ##### [key: string]: any

  #### Returns void

### addContextValue

- addContextValue(key: string, value: any): void

- - Defined in ui/Base/QueryBuilder.ts :499

  #### Parameters

  - ##### key: string

  - ##### value: any

  #### Returns void

### addFieldsToExclude

- addFieldsToExclude(fields: string[]): void

- - Defined in ui/Base/QueryBuilder.ts :481

  #### Parameters

  - ##### fields: string[]

  #### Returns void

### addFieldsToInclude

- addFieldsToInclude(fields: string[]): void

- - Defined in ui/Base/QueryBuilder.ts :467

  #### Parameters

  - ##### fields: string[]

  #### Returns void

### build

- build(): IQuery

- - Defined in ui/Base/QueryBuilder.ts :337

  #### Returns IQuery

### computeCompleteExpression

- computeCompleteExpression(): string

- - Defined in ui/Base/QueryBuilder.ts :398

  #### Returns string

### computeCompleteExpressionExcept

- computeCompleteExpressionExcept(except: string): string

- - Defined in ui/Base/QueryBuilder.ts :422

  #### Parameters

  - ##### except: string

  #### Returns string

### computeCompleteExpressionParts

- computeCompleteExpressionParts(): QueryBuilderExpression

- - Defined in ui/Base/QueryBuilder.ts :406

  #### Returns QueryBuilderExpression

### computeCompleteExpressionPartsExcept

- computeCompleteExpressionPartsExcept(except: string): QueryBuilderExpression

- - Defined in ui/Base/QueryBuilder.ts :433

  #### Parameters

  - ##### except: string

  #### Returns QueryBuilderExpression

### containsEndUserKeywords

- containsEndUserKeywords(): boolean

- - Defined in ui/Base/QueryBuilder.ts :523

  #### Returns boolean

## Properties

### actionsHistory

actionsHistory: string

- Defined in ui/Base/QueryBuilder.ts :310

### advancedExpression

advancedExpression: ExpressionBuilder

- Defined in ui/Base/QueryBuilder.ts :32

### allowQueriesWithoutKeywords

allowQueriesWithoutKeywords: boolean

- Defined in ui/Base/QueryBuilder.ts :322

### categoryFacets

categoryFacets: ICategoryFacetRequest[]

- Defined in ui/Base/QueryBuilder.ts :298

### childField

childField: string

- Defined in ui/Base/QueryBuilder.ts :227

### commerce

commerce: ICommerceRequest

- Defined in ui/Base/QueryBuilder.ts :330

### constantExpression

constantExpression: ExpressionBuilder

- Defined in ui/Base/QueryBuilder.ts :39

### context

context: object

- Defined in ui/Base/QueryBuilder.ts :305

#### Type declaration

- ##### [key: string]: any

### disjunctionExpression

disjunctionExpression: ExpressionBuilder

- Defined in ui/Base/QueryBuilder.ts :56

### enableCollaborativeRating

enableCollaborativeRating: boolean

- Defined in ui/Base/QueryBuilder.ts :251

### enableDebug

enableDebug: boolean

- Defined in ui/Base/QueryBuilder.ts :243

### enableDidYouMean

enableDidYouMean: boolean

- Defined in ui/Base/QueryBuilder.ts :235

### enableLowercaseOperators

enableLowercaseOperators: boolean

- Defined in ui/Base/QueryBuilder.ts :141

### enablePartialMatch

enablePartialMatch: boolean

- Defined in ui/Base/QueryBuilder.ts :155

### enableQuerySyntax

enableQuerySyntax: boolean

- Defined in ui/Base/QueryBuilder.ts :127

### enableQuestionMarks

enableQuestionMarks: boolean

- Defined in ui/Base/QueryBuilder.ts :111

### enableWildcards

enableWildcards: boolean

- Defined in ui/Base/QueryBuilder.ts :97

### excerptLength

excerptLength: number

- Defined in ui/Base/QueryBuilder.ts :207

### expression

expression: ExpressionBuilder

- Defined in ui/Base/QueryBuilder.ts :25

### facetOptions

facetOptions: IFacetOptions

- Defined in ui/Base/QueryBuilder.ts :293

### facetRequests

facetRequests: IFacetRequest[]

- Defined in ui/Base/QueryBuilder.ts :288

### filterField

filterField: string

- Defined in ui/Base/QueryBuilder.ts :215

### filterFieldRange

filterFieldRange: number

- Defined in ui/Base/QueryBuilder.ts :219

### firstResult

firstResult: number

- Defined in ui/Base/QueryBuilder.ts :193

### groupByRequests

groupByRequests: IGroupByRequest[]

- Defined in ui/Base/QueryBuilder.ts :282

### longQueryExpression

longQueryExpression: ExpressionBuilder

- Defined in ui/Base/QueryBuilder.ts :47

### maximumAge

maximumAge: number

- Defined in ui/Base/QueryBuilder.ts :81

### numberOfResults

numberOfResults: number

- Defined in ui/Base/QueryBuilder.ts :199

### parentField

parentField: string

- Defined in ui/Base/QueryBuilder.ts :223

### partialMatchKeywords

partialMatchKeywords: number

- Defined in ui/Base/QueryBuilder.ts :171

### partialMatchThreshold

partialMatchThreshold: string

- Defined in ui/Base/QueryBuilder.ts :187

### pipeline

pipeline: string

- Defined in ui/Base/QueryBuilder.ts :73

### queryFunctions

queryFunctions: IQueryFunction[]

- Defined in ui/Base/QueryBuilder.ts :273

### rankingFunctions

rankingFunctions: IRankingFunction[]

- Defined in ui/Base/QueryBuilder.ts :277

### recommendation

recommendation: string

- Defined in ui/Base/QueryBuilder.ts :314

### searchHub

searchHub: string

- Defined in ui/Base/QueryBuilder.ts :62

### sortCriteria

sortCriteria: string

- Defined in ui/Base/QueryBuilder.ts :262

### sortField

sortField: string

- Defined in ui/Base/QueryBuilder.ts :266

### tab

tab: string

- Defined in ui/Base/QueryBuilder.ts :66

### userActions

userActions: IUserActionsRequest

- Defined in ui/Base/QueryBuilder.ts :326

### Hierarchy

- QueryBuilder