Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"implicit OR" in certain Librarian search clauses #42

Open
pkgw opened this issue Oct 7, 2017 · 0 comments
Open

"implicit OR" in certain Librarian search clauses #42

pkgw opened this issue Oct 7, 2017 · 0 comments

Comments

@pkgw
Copy link
Contributor

pkgw commented Oct 7, 2017

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.

@pkgw pkgw changed the title "implicit or" in certain Librarian search clauses "implicit OR" in certain Librarian search clauses Oct 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant