Skip to main content

xlucene-parser / utils

utils

Index

Interfaces

InterfaceDescription
ParsedRange-

Variables

coerceValueFns

const coerceValueFns: CoerceValueFns

Source

xlucene-parser/src/utils.ts:247


groupTypes

const groupTypes: NodeType[]

logical group or field group with flow

Source

xlucene-parser/src/utils.ts:129


logger

const logger: Logger

Source

xlucene-parser/src/utils.ts:33


numberDataTypes

const numberDataTypes: xLuceneFieldType[]

Source

xlucene-parser/src/utils.ts:96


termTypes

const termTypes: readonly NodeType[]

term level queries with field (string|null)

Source

xlucene-parser/src/utils.ts:115

Functions

coordinateToXlucene()

coordinateToXlucene(cord): string

Parameters

ParameterType
cordCoordinateTuple

Returns

string

Source

xlucene-parser/src/utils.ts:241


createIPRangeFromTerm()

createIPRangeFromTerm(node, value): Range

Parameters

ParameterType
nodeTerm
valuestring

Returns

Range

Source

xlucene-parser/src/utils.ts:291


getField()

getField(node): string | undefined

Parameters

ParameterType
nodeunknown

Returns

string | undefined

Source

xlucene-parser/src/utils.ts:108


getFieldValue()

getFieldValue(value, variables, allowNil)

getFieldValue<T>(value, variables, allowNil): Maybe<T>

Type parameters
Type parameter
T
Parameters
ParameterType
valueFieldValue<T>
variablesxLuceneVariables
allowNiltrue
Returns

Maybe<T>

Source

xlucene-parser/src/utils.ts:145

getFieldValue(value, variables, allowNil)

getFieldValue<T>(value, variables, allowNil?): T

Type parameters
Type parameter
T
Parameters
ParameterType
valueFieldValue<T>
variablesxLuceneVariables
allowNil?boolean
Returns

T

Source

xlucene-parser/src/utils.ts:150

getFieldValue(value, variables, allowNil)

getFieldValue<T>(value, variables, allowNil?): T[]

Type parameters
Type parameter
T
Parameters
ParameterType
valueFieldValue<T>[]
variablesxLuceneVariables
allowNil?boolean
Returns

T[]

Source

xlucene-parser/src/utils.ts:155


isBooleanDataType()

isBooleanDataType(node): node is BooleanDataType

Parameters

ParameterType
nodeunknown

Returns

node is BooleanDataType

Source

xlucene-parser/src/utils.ts:104


isConjunction()

isConjunction(node): node is Conjunction

Parameters

ParameterType
nodeunknown

Returns

node is Conjunction

Source

xlucene-parser/src/utils.ts:44


isEmptyNode()

isEmptyNode(node): node is EmptyNode

Parameters

ParameterType
nodeunknown

Returns

node is EmptyNode

Source

xlucene-parser/src/utils.ts:88


isExists()

isExists(node): node is Exists

Parameters

ParameterType
nodeunknown

Returns

node is Exists

Source

xlucene-parser/src/utils.ts:56


isFieldGroup()

isFieldGroup(node): node is FieldGroup

Parameters

ParameterType
nodeunknown

Returns

node is FieldGroup

Source

xlucene-parser/src/utils.ts:52


isFunctionNode()

isFunctionNode(node): node is FunctionNode

Parameters

ParameterType
nodeunknown

Returns

node is FunctionNode

Source

xlucene-parser/src/utils.ts:64


isGroupLike()

isGroupLike(node): node is GroupLikeNode

Parameters

ParameterType
nodeunknown

Returns

node is GroupLikeNode

Source

xlucene-parser/src/utils.ts:131


isInfiniteMax()

isInfiniteMax(max?): boolean

Parameters

ParameterType
max?string | number

Returns

boolean

Source

xlucene-parser/src/utils.ts:210


isInfiniteMin()

isInfiniteMin(min?): boolean

Parameters

ParameterType
min?string | number

Returns

boolean

Source

xlucene-parser/src/utils.ts:205


isInfiniteValue()

isInfiniteValue(input?): boolean

Parameters

ParameterType
input?string | number

Returns

boolean

Source

xlucene-parser/src/utils.ts:201


isLogicalGroup()

isLogicalGroup(node): node is LogicalGroup

Parameters

ParameterType
nodeunknown

Returns

node is LogicalGroup

Source

xlucene-parser/src/utils.ts:40


isNegation()

isNegation(node): node is Negation

Parameters

ParameterType
nodeunknown

Returns

node is Negation

Source

xlucene-parser/src/utils.ts:48


isNumberDataType()

isNumberDataType(node): node is NumberDataType

Parameters

ParameterType
nodeunknown

Returns

node is NumberDataType

Source

xlucene-parser/src/utils.ts:100


isRange()

isRange(node): node is Range

Parameters

ParameterType
nodeunknown

Returns

node is Range

Source

xlucene-parser/src/utils.ts:60


isRegexp()

isRegexp(node): node is Regexp

Parameters

ParameterType
nodeunknown

Returns

node is Regexp

Source

xlucene-parser/src/utils.ts:68


isStringDataType()

isStringDataType(node): node is StringDataType

Parameters

ParameterType
nodeunknown

Returns

node is StringDataType

Source

xlucene-parser/src/utils.ts:92


isTerm()

isTerm(node): node is Term

Parameters

ParameterType
nodeunknown

Returns

node is Term

Source

xlucene-parser/src/utils.ts:80


isTermList()

isTermList(node): node is TermList

Parameters

ParameterType
nodeunknown

Returns

node is TermList

Source

xlucene-parser/src/utils.ts:84


isTermType()

isTermType(node): node is TermLikeNode

Parameters

ParameterType
nodeunknown

Returns

node is TermLikeNode

Source

xlucene-parser/src/utils.ts:124


isWildcard()

isWildcard(node): node is Wildcard

Parameters

ParameterType
nodeunknown

Returns

node is Wildcard

Source

xlucene-parser/src/utils.ts:72


isWildcardField()

isWildcardField(node): boolean

Parameters

ParameterType
nodeunknown

Returns

boolean

Source

xlucene-parser/src/utils.ts:76


makeCoerceFn()

makeCoerceFn(fieldType): (v) => any

Parameters

ParameterType
fieldTypeundefined | xLuceneFieldType

Returns

Function

Parameters
ParameterType
vany
Returns

any

Source

xlucene-parser/src/utils.ts:285


parseRange()

parseRange(node, variables, excludeInfinite): ParsedRange

Parameters

ParameterTypeDefault value
nodeRangeundefined
variablesxLuceneVariablesundefined
excludeInfinitebooleanfalse

Returns

ParsedRange

Source

xlucene-parser/src/utils.ts:222


validateVariables()

validateVariables(obj): xLuceneVariables

Parameters

ParameterType
objxLuceneVariables

Returns

xLuceneVariables

Source

xlucene-parser/src/utils.ts:135