Search Syntax

The search syntax is mapped to the Search interface

Warning

the current syntax is preliminary and will be fully documented once accepted. See the tutorial for current documentation.

Boolean Combinations

Warning

this feature is experimental and will be documented after acceptance

Multiple terms can be specified with boolean combinators:

SEARCH1 SEARCH2 .not SEARCH3

The implicit combinator is OR. This will take the union of search1 and search2 and subtract search3 results

Search Datamodel

oaklib.datamodels.search.create_search_configuration(term: str) SearchConfiguration[source]

Generates a search configuration based on search syntax

term is either a plaintext search term, or a search term prefixed by

    1. a property packages, one of t, ., l (for term, anything, label)

    1. a match type indicator, one of “~”,”/”,”=”,”^”,”@”

For more documentation, see Search docs

Parameters:

term

Returns:

class oaklib.datamodels.search.SearchConfiguration(*args, _if_missing: Callable[[JsonObj, str], Tuple[bool, Any]] | None = None, **kwargs)[source]

Parameters for altering behavior of search

Examples:

>>> from oaklib.datamodels.search import SearchConfiguration, SearchTermSyntax
>>> cfg = SearchConfiguration(syntax=SearchTermSyntax.REGULAR_EXPRESSION)