tlc.core.objects.tables.from_table.filtered_table_criteria.freetext_filter_criterion¶
Module Contents¶
Classes¶
Class |
Description |
|---|---|
FreeTextFilterCriterion is a criterion that matches across the whole row |
API¶
- class FreeTextFilterCriterion(
- negate: bool | None = None,
- freetext_search_string: str | None = None,
- use_case_insensitive_search: bool | None = None,
- init_parameters: Any = None,
Bases:
tlc.core.objects.tables.from_table.filtered_table_criteria.filter_criterion.FilterCriterionFreeTextFilterCriterion is a criterion that matches across the whole row
It splits the the search string into parts and matches each part against all columns of the row. A match is found if all parts are found at least once in any column of the row.
.. rubric:: Examples
search, row, match, comment “A”, {“col_1”: “A”, “col_2”: “B”} => True, only part found in col 1 “A B”, {“col_1”: “ABC”, “col_2”: “DEF”} => True, all parts are found in col_1 “A B”, {“col_1”: “ACE”, “col_2”: “BDF”} => True, part 1 in col_1, part 2 in col_2 “cat”, {“label”: 1} => True, given a ValueMap with {1:”cat”}
Create a FreeTextFilterCriterion.
- Parameters:
negate – Whether to negate the filter criterion.
freetext_search_string – The search string to match against the row.
use_case_insensitive_search – Whether to use case insensitive search.
init_parameters – Parameters used during object initialization.
- static from_any(
- any_filter_criterion: FilterCriterion | Mapping,