import { IDocumentQueryBase } from "./IDocumentQueryBase.js"; import { IQueryBase } from "./IQueryBase.js"; import { SearchOperator } from "../Queries/SearchOperator.js"; import { MethodCall } from "./MethodCall.js"; import { WhereParams } from "./WhereParams.js"; import { SpatialUnits, SpatialRelation } from "../Indexes/Spatial.js"; import { SpatialCriteria } from "../Queries/Spatial/SpatialCriteria.js"; import { SpatialCriteriaFactory } from "../Queries/Spatial/SpatialCriteriaFactory.js"; import { IDocumentQuery } from "./IDocumentQuery.js"; import { DynamicSpatialField } from "../Queries/Spatial/DynamicSpatialField.js"; import { MoreLikeThisBase } from "../Queries/MoreLikeThis/MoreLikeThisBase.js"; import { Field } from "../../Types/index.js"; export interface IFilterDocumentQueryBase> extends IQueryBase { /** * Negate the next operation */ not(): TSelf; /** * Add an AND to the query */ andAlso(): TSelf; /** * Add an AND to the query */ andAlso(wrapPreviousQueryClauses: boolean): TSelf; /** * Simplified method for closing a clause within the query */ closeSubclause(): TSelf; /** * Performs a query matching ALL of the provided values against the given field (AND) */ containsAll(fieldName: Field, values: any[]): TSelf; /** * Performs a query matching ANY of the provided values against the given field (OR) */ containsAny(fieldName: Field, values: any[]): TSelf; /** * Negate the next operation */ negateNext(): TSelf; /** * Simplified method for opening a new clause within the query */ openSubclause(): TSelf; /** * Add an OR to the query */ orElse(): TSelf; /** * Perform a search for documents which fields that match the searchTerms. * If there is more than a single term, each of them will be checked independently. * * Space separated terms e.g. 'John Adam' means that we will look in selected field for 'John' * or 'Adam'. */ search(fieldName: Field, searchTerms: string): TSelf; /** * Perform a search for documents which fields that match the searchTerms. * If there is more than a single term, each of them will be checked independently. * * Space separated terms e.g. 'John Adam' means that we will look in selected field for 'John' * or 'Adam'. */ search(fieldName: Field, searchTerms: string, operator: SearchOperator): TSelf; /** * Filter the results from the index using the specified where clause. */ whereLucene(fieldName: Field, whereClause: string): TSelf; /** * Filter the results from the index using the specified where clause. */ whereLucene(fieldName: Field, whereClause: string, exact: boolean): TSelf; /** * Matches fields where the value is between the specified start and end, inclusive */ whereBetween(fieldName: Field, start: any, end: any): TSelf; /** * Matches fields where the value is between the specified start and end, inclusive */ whereBetween(fieldName: Field, start: any, end: any, exact: boolean): TSelf; /** * Matches fields which ends with the specified value. */ whereEndsWith(fieldName: Field, value: any): TSelf; /** * Matches fields which ends with the specified value. */ whereEndsWith(fieldName: Field, value: any, exact: boolean): TSelf; /** * Matches value */ whereEquals(fieldName: Field, value: any): TSelf; /** * Matches value */ whereEquals(fieldName: Field, value: any, exact: boolean): TSelf; /** * Matches value */ whereEquals(fieldName: Field, method: MethodCall): TSelf; /** * Matches value */ whereEquals(fieldName: Field, method: MethodCall, exact: boolean): TSelf; /** * Matches value */ whereEquals(whereParams: WhereParams): TSelf; /** * Not matches value */ whereNotEquals(fieldName: Field, value: any): TSelf; /** * Not matches value */ whereNotEquals(fieldName: Field, value: any, exact: boolean): TSelf; /** * Not matches value */ whereNotEquals(fieldName: Field, method: MethodCall): TSelf; /** * Not matches value */ whereNotEquals(fieldName: Field, method: MethodCall, exact: boolean): TSelf; /** * Not matches value */ whereNotEquals(whereParams: WhereParams): TSelf; /** * Matches fields where the value is greater than the specified value */ whereGreaterThan(fieldName: Field, value: any): TSelf; /** * Matches fields where the value is greater than the specified value */ whereGreaterThan(fieldName: Field, value: any, exact: boolean): TSelf; /** * Matches fields where the value is greater than or equal to the specified value */ whereGreaterThanOrEqual(fieldName: Field, value: any): TSelf; /** * Matches fields where the value is greater than or equal to the specified value */ whereGreaterThanOrEqual(fieldName: Field, value: any, exact: boolean): TSelf; /** * Check that the field has one of the specified values */ whereIn(fieldName: Field, values: any[]): TSelf; /** * Check that the field has one of the specified values */ whereIn(fieldName: Field, values: any[], exact: boolean): TSelf; /** * Matches fields where the value is less than the specified value */ whereLessThan(fieldName: Field, value: any): TSelf; /** * Matches fields where the value is less than the specified value */ whereLessThan(fieldName: Field, value: any, exact: boolean): TSelf; /** * Matches fields where the value is less than or equal to the specified value */ whereLessThanOrEqual(fieldName: Field, value: any): TSelf; /** * Matches fields where the value is less than or equal to the specified value */ whereLessThanOrEqual(fieldName: Field, value: any, exact: boolean): TSelf; /** * Matches fields which starts with the specified value. */ whereStartsWith(fieldName: Field, value: any): TSelf; /** * Matches fields which starts with the specified value. */ whereStartsWith(fieldName: Field, value: any, exact: boolean): TSelf; /** * Check if the given field exists */ whereExists(fieldName: Field): TSelf; /** * Checks value of a given field against supplied regular expression pattern */ whereRegex(fieldName: Field, pattern: string): TSelf; /** * Filter matches to be inside the specified radius */ withinRadiusOf(fieldName: Field, radius: number, latitude: number, longitude: number): TSelf; /** * Filter matches to be inside the specified radius */ withinRadiusOf(fieldName: Field, radius: number, latitude: number, longitude: number, radiusUnits: SpatialUnits): TSelf; /** * Filter matches to be inside the specified radius */ withinRadiusOf(fieldName: Field, radius: number, latitude: number, longitude: number, radiusUnits: SpatialUnits, distanceErrorPct: number): TSelf; /** * Filter matches based on a given shape - only documents with the shape defined in fieldName that * have a relation rel with the given shapeWkt will be returned */ relatesToShape(fieldName: Field, shapeWkt: string, relation: SpatialRelation): TSelf; /** * Filter matches based on a given shape - only documents with the shape defined in fieldName that * have a relation rel with the given shapeWkt will be returned */ relatesToShape(fieldName: Field, shapeWkt: string, relation: SpatialRelation, distanceErrorPct: number): TSelf; /** * Filter matches based on a given shape - only documents with the shape defined in fieldName that * have a relation rel with the given shapeWkt will be returned */ relatesToShape(fieldName: Field, shapeWkt: string, relation: SpatialRelation, units: SpatialUnits, distanceErrorPct: number): TSelf; /** * Ability to use one factory to determine spatial shape that will be used in query. */ spatial(fieldName: Field, clause: (spatialCriteriaFactory: SpatialCriteriaFactory) => SpatialCriteria): IDocumentQuery; spatial(field: DynamicSpatialField, clause: (spatialCriteriaFactory: SpatialCriteriaFactory) => SpatialCriteria): IDocumentQuery; moreLikeThis(moreLikeThis: MoreLikeThisBase): IDocumentQuery; } //# sourceMappingURL=IFilterDocumentQueryBase.d.ts.map