Protected _accessProtected _clientPrivate Optional _customProtected _dataProtected _graphProtected _runtimeProtected _schemaPrivate connectorsStatic Private s3Prepares values for the relationships field.
Extracts fields to use in the predicates field.
Optional args: Record<string, any>Private _toPrivate addPrivate buildPrivate buildInject the relationship filter terms into the search query.
Optional searchQuery: CSQLCreates a vertex search document in ES.
Private executeOptional searchQuery: CSQLPrivate findThis is derived from of the method of the same name from GraphHandler.
(We can't simply inject GraphHandler here because of circular dependencies)
It's not exactly identical, mostly because TypeScript.
Optional type: string | ((item: ItemWithIdAndLabel) => string)Private getGets cache tags based on vertex type terms from a given query.
This function takes a CSQL query and extracts cache tags related to vertex types. It gathers term filters, checks if they relate to vertex types, and extracts vertex type terms. It returns these terms as a sorted, deduplicated list. If no relevant vertex types are found, it returns null.
A sorted array of unique vertex type terms as cache tags, or null if none are found.
// Example with a single value filter for vertex types:
const query = {
docType: 'vertex',
termFilters: [
{ path: 'entity_type', term: 'User' }
],
termsFilters: [
{ path: 'status', terms: ['active', 'blocked'] }
]
};
// The function will return the following cache tags:
// ['User']
// Example with multiple value filters for vertex types:
const query = {
docType: 'vertex',
termFilters: [
{ path: 'status', term: 'active' }
],
termsFilters: [
{ path: 'entity_type', terms: ['Team', 'Organisation'] }
]
};
// The function will return the following cache tags:
// ['Team', 'Organisation']
// Example for queries specifically related to edges:
const query = {
docType: 'edge',
termFilters: [
{ path: 'entity_type', term: 'memberOf' }
],
termsFilters: [
{ path: 'to_label', terms: ['Location', 'JobRole'] }
]
};
// The function will return the following cache tags:
// ['Location', 'JobRole']
The CSQL query object containing filters and conditions.
Private getPrivate getPrivate getPrivate getPrivate injectPrivate prepareCSQLPrivate preparePrivate preparePrivate
Prepares the search results hits by mapping each hit to its entity ID and source.
The array of vertex search results.
Private searchPrepares and runs ES's query.
Private searchPrivate sourceDecide whether to use search or graph to load the data.
The general rule is that if we have filters in the list query arguments that depend on one or the other, we use whichever the filters require. If we have both, we throw an error. If we have neither, we fall back to the default preference (which should be configurable: TODO).
true for search, false for graph.
The list query arguments, which may include graph-based filters, search-based filters, or no filters at all.
Unsafely (i.e. bypassing access control) retrieve documents directly by UUID.
This is intended for internal use, e.g. to allow the Search trait to compare updates against the previous indexed version. It should not be used to retrieve a document to be presented to the user, unless the IDs have already been subjected to access control checks.
The UUIDs of the documents.
The UUID of the tenant.
Private validateGenerated using TypeDoc
Prepares values for the access_keys field.