Skip to content

"implicit OR" in certain Librarian search clauses #42

@pkgw

Description

@pkgw

I just tried to write the following query:

{ "or": {
  "name-matches": "%.uv",
  "name-matches": "%.calfits"
} }

This, of course, doesn't work, since a dict can only contain one of each kind of key.

I think it would be helpful to add an "implicit OR" syntax where lists on the right-hand side for this kind of query clause are implicitly OR'ed together logically:

{ "name-matches": ["%.uv", "%.calfits"] }

I think the combination of the implicit AND in dicts and implicit OR on clauses will work nicely, and it definitely saves typing in this particular case.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions