Skip to main content

xlucene-translator / translator/utils

translator/utils

Functions

canFlattenBoolQuery()

canFlattenBoolQuery(query, flattenTo): boolean

This prevents double nested queries that do the same thing

Parameters

ParameterType
queryBoolQuery
flattenToBoolQueryTypes

Returns

boolean

Source

xlucene-translator/src/translator/utils.ts:371


compactFinalQuery()

compactFinalQuery(query?): i.AnyQuery | i.AnyQuery[]

Parameters

ParameterType
query?AnyQuery

Returns

i.AnyQuery | i.AnyQuery[]

Source

xlucene-translator/src/translator/utils.ts:382


flattenQuery()

flattenQuery(query, flattenTo): i.AnyQuery[]

Parameters

ParameterType
queryundefined | AnyQuery
flattenToBoolQueryTypes

Returns

i.AnyQuery[]

Source

xlucene-translator/src/translator/utils.ts:359


getTermField()

getTermField(node): string

Parameters

ParameterType
nodeTermLikeNode

Returns

string

Source

xlucene-translator/src/translator/utils.ts:355


isBoolQuery()

isBoolQuery(query): query is BoolQuery

Parameters

ParameterType
queryunknown

Returns

query is BoolQuery

Source

xlucene-translator/src/translator/utils.ts:377


isMultiMatch()

isMultiMatch(node): boolean

Parameters

ParameterType
nodeTermLikeNode

Returns

boolean

Source

xlucene-translator/src/translator/utils.ts:351


translateQuery()

translateQuery(parser, options): i.ElasticsearchDSLResult

Parameters

ParameterType
parserParser
optionsUtilsTranslateQueryOptions

Returns

i.ElasticsearchDSLResult

Source

xlucene-translator/src/translator/utils.ts:25