ftmq.search
Source code in ftmq/search/store/__init__.py
FilterTerm
dataclass
One search-index predicate: field holds any of values (none, if negated).
The terms of a query AND together.
Source code in ftmq/search/store/base.py
get_filters(query)
Compile a query's filter tree into the flat term list a search index applies.
Only datasets, schema and countries are indexed, filters on other fields
are dropped. A not / not_in comparator (or ~ around a single condition)
becomes a negated term.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
Query | None
|
The query to compile ( |
required |
Returns:
| Type | Description |
|---|---|
list[FilterTerm]
|
The terms to AND together. |
Raises:
| Type | Description |
|---|---|
QueryError
|
For a shape ANDed terms can't express (a cross-field OR, a
negated group, a comparator like |