Skip to content

Improve document stores capabilities: add more operations #2634

@davidsbatista

Description

@davidsbatista

Add the following operations to our document stores:

count_documents_by_filter(filter: dict) -> int applies a filter and counts the documents that matched it.

count_distinct_values_by_filter(filter: dict) -> dict[str, int] applies a filter selecting documents and counts the unique values for each meta field of the matched documents

get_fields_info() -> dict[str, dict] returns the meta fields and the corresponding types

get_field_min_max(metadata_field: str) -> dict[str, Any] for a given metadata field, find its max and min value

get_field_unique_values(field_name: str, search_term: str | None, from_: int, size: int) -> tuple[list[str], int] - retrieves unique values for a field matching a search_term or all possible values if no search term is given

query_sql(query: str) - optional - issue an SQL query for the doc stores that support it

Sub-issues

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions