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

Add multivalue variants to the query language #34

Open
jrdh opened this issue Dec 12, 2019 · 1 comment
Open

Add multivalue variants to the query language #34

jrdh opened this issue Dec 12, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@jrdh
Copy link
Member

jrdh commented Dec 12, 2019

This is something I've noticed from using the search interface a bit, particularly during a request from @bwprice recently, was that searching for multiple values on the same field is a pain in the arse but it's also a common use case. Here's an example search: https://data.nhm.ac.uk/search/open-dirty-cheetah which is just trying to find all the specimens matching a set of species names. The or works great but it's a bit arduous to build (particularly if you then want to change the nesting and have to rebuild it but that's another issue...). I can also see this being useful for finding multiple specimens using a set of ids.

Two initial ideas come to mind:

  1. Allow the value in string_equals, string_contains and number_equals to take a list of values instead of just a single one.
  2. Add new terms for multiple values - string_equals_multi, string_contains_multi and number_equals_multi for example

We also need to decide whether to include any other terms like geo_point or geo_named_area. geo_point to me feels not worth it, whereas geo_named_area may well be.

@jrdh jrdh added the enhancement New feature or request label Dec 12, 2019
@jrdh
Copy link
Member Author

jrdh commented Dec 12, 2019

Another example use case for this: https://doi.org/10.5519/qd.uqv4g9ys. This request came from Charlotte in the data management team - she had a list of 4131 specimens which a student wanted to capture under one DOI but didn't have a common field that we expose to search on (the EMu field AdmImportIdentifier could have been used but isn't one we expose). Therefore I created 17 number_range terms on the barcodes to find them all because otherwise I would have had to create 4131 string_equal terms in an even bigger or.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant