The Predicate tree root uses an [AND]BooleanOperator#AND operator to combine the Predicates.
a CategoryFactory instance. This dependency is optional. It is required if we want to load predicate filter from saved metadata
Filter that should be applied to the view when no searching is being performed. Injected trough the NAE_BASE_FILTER injection token.
boolean flag that determines whether net-related categories should be ignored when providing autocomplete suggestions. Injected through the NAE_IGNORE_NETS_ON_AUTOCOMPLETE_CATEGORY injection token.
service to parse query tree into QueryItems
Protected_activeHolds the Filter that is currently being applied to the view.
Protected_baseFilter that is applied to the view, even if the user doesn't search anything.
Protected_categorya CategoryFactory instance. This dependency is optional. It is required if we want to load predicate filter from saved metadata
Protected_fullHolds the full text Filter if set, undefined otherwise.
Protected_ignoreboolean flag that determines whether net-related categories should be ignored when providing autocomplete suggestions. Injected through the NAE_IGNORE_NETS_ON_AUTOCOMPLETE_CATEGORY injection token.
Protected_loadingProtected_logProtected_predicateThe index of a removed Predicate is emmited into this stream
Protected_rootHolds the Predicate tree root for user search queries.
Protected_visitorservice to parse query tree into QueryItems
true if a filter other than the base filter is currently applied.
Returns false if only the base filter is currently applied.
the type of the filter held in this search service instance
true if any visible predicates are applied.
Returns false if there are no predicates, or if there are only hidden predicates applied
whether the search service is currently loading its state from PFQL query or not.
See [loadFromPfql()]SearchService#loadFromPfql
an Observable that emits true if the search service is currently loading its state from PFQL query,
emits false otherwise.
See [loadFromPfql()]SearchService#loadFromPfql
an Observable that emits the index of the removed predicate whenever a predicate is removed
the root predicate of the search service, that can be used to generate search requests with custom queries
Adds a new hidden branch of the predicate tree with a singular leaf node containing the provided Query.
This can be used to add predicates to the search tree (think header search), which can be made visible and editable in the search GUI later.
the generator that is in such state, that it generates the Query, that should be added as branch/leaf. If the generator doesn't currently generate a query a node with an empty query will be added.
Adds a Predicate to the Predicate root and updates the active Filter.
Predicates added this way will not be visible in the search GUI. If you want to make sure your predicates are visible (and editable) use the [addGeneratedLeafPredicate()]SearchService#addGeneratedLeafPredicate method instead.
Predicate that should be added to the search queries.
the index of the added Predicate
Removes all Predicate objects that contribute to the search. Updates the active Filter if it was affected.
whether the hidden predicates should be cleared as well
whether the filter should be updated
an Array of filter text segments that correspond to the currently displayed completed predicates
ProtectedloadRecursively loads an array of query items (expressions and logical operators) into a predicate node.
Processes each query item in the array:
the predicate node into which the query items should be loaded
array of query items to process and load into the predicate tree
an array of observables that emit when each category's data has been loaded from its expression
Loads a PFQL query string into the search service's predicate tree structure.
Parses the provided PFQL query and reconstructs the predicate tree from it. The query resource type must match the filter type of this search service. All existing predicates (including hidden ones) are cleared before loading the new query.
the PFQL query string to parse and load into the predicate tree
ProtectedloadProtectedloadLoads a raw PFQL expression into a predicate node.
Creates a new clause predicate branch, extracts the plain query category from the raw expression, loads the expression data into the category, and adds the category as a new predicate generator to the created branch.
the predicate node into which the raw expression should be loaded
the raw expression to load
an observable that emits when the category data has been loaded from the expression
ProtectedloadLoads a simple PFQL expression into a predicate node.
Extracts the category from the simple expression, loads the expression data into the category, and adds the category as a new predicate generator to the given predicate node.
the predicate node into which the simple expression should be loaded
the simple expression to load
an observable that emits when the category data has been loaded from the expression
Removes the Predicate object from the provided index. If the index is invalid does nothing. Updates the the active Filter if the Predicate tree was affected.
index of the Predicate that should be removed
whether the input, that corresponds to the predicate should be cleared
Adds a Filter with the [fullText]CaseSearchRequestBody#fullText attribute set to the provided value. If full text filter is already set, it will be replaced.
value that should be searched on all full text fields
ProtectedupdateLoads whole new filter and search cases/tasks based on this filter
whole new filter that should be used for search
ProtectedvalidateValidates that the resource type prefix in the PFQL query matches the filter type of this search service.
the PFQL query string to validate
true if the query's resource type prefix matches the search service's filter type, false otherwise
Holds information about the filter that is currently applied to the view component, that provides this services.