Extend entry search filtering

This commit is contained in:
thePR0M3TH3AN
2025-07-18 14:54:10 -04:00
parent 5eab7f879c
commit b0ba723bdd
10 changed files with 90 additions and 86 deletions

View File

@@ -220,9 +220,21 @@ class EntryService:
include_archived=include_archived,
)
def search_entries(self, query: str):
def search_entries(
self, query: str, kinds: list[str] | None = None
) -> list[tuple[int, str, str | None, str | None, bool]]:
"""Search entries optionally filtering by ``kinds``.
Parameters
----------
query:
Search string to match against entry metadata.
kinds:
Optional list of entry kinds to restrict the search.
"""
with self._lock:
return self._manager.entry_manager.search_entries(query)
return self._manager.entry_manager.search_entries(query, kinds=kinds)
def retrieve_entry(self, entry_id: int):
with self._lock: