...
To let end users create complex search queries Asta7 offers a query builder or advanced search. Instead of a fixed advanced search users can create searches/filters of their own using a simple UI.
...
User Stories
/wiki/spaces/AO/pages/1634598936
Classes
...
FilterSearch
This is the root class that saves queries against a user. It is also possible to make a filter global.
QueryGroup
This is used to group multiple queries. Based on the group condition it can either be grouped as an AND
query or an OR
query. A query group can contain many query groups or query rules.
QueryRule
This is used to link the query field, query operator, and user-provided value. It is also possible to negate the query using the negate
property of this class.
QueryOperator
This is what generates individual ES queries like query_string
, term
, range
, etc. It uses the query field and user-provided value and converts them to the appropriate ES query. For example, the ContainsQueryOperator
of TextQueryField
generates an ES query_string
query with wildcards at both ends.
QueryField
This class holds information about the actual ES field (name, label, nested path, etc.).
SortRule
This is used for generating sorting rules with field names and order. There can be multiple sorting rules.
How to operate
For every query in the filter user has to select a field first, then based on the selected field a list of operators will appear, and based on the selected operator an appropriate value field will be shown.
Fields and Operators
Operators are dependent on fields and field types. Below is the list of all the current operators available:
...