Skip to content

Extended search functionality #425

@joahim

Description

@joahim

def search(

The existing search function does not provide means to:

  1. search for a value across all objects (case with missing predicate value)
  2. search for existence of predicate (case with missing object value)

While 2. may not be needed (or could even be hard for users to understand), 1. is valuable for users since it facilitates sort of "full text search" where the user does not necessarily need to know the predicate value but knows the object value (e.g. title).

The API of the search call could be modified to support this in the following way: instead of a dictionary to pass in parameters, use a list of tuples (predicate, object). Passing None for predicate value supports case 1 above. Passing None for object value supports case 2 above. Using this approach would also allow for cases where a user wants to search for multiple objects for single predicate (e.g. dc:title=Foo | dc:title=Bar).

Additionally, the existing criterias and regex parameters could be merged into one by using a list of tuples (predicate, object, regex) where regex: bool = False would signify whether to use regular expression search or not for a given criteria pair.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions