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

Filter by PID enabling different matching conditions #1061

Merged
merged 5 commits into from
May 17, 2023
Merged

Conversation

minottic
Copy link
Contributor

@minottic minottic commented May 16, 2023

Description

It enables to use PID field for filtering and returns a list of matching results before jumping to the details page. A toggle allows defining the condition to use when doing the search. Currently, three options are supported:

  • equals
  • contains
  • startsWith

Please note that contains is intensive for the DB, so evaluate if to create an index on the db or speed it up by other means.
The toggle is optional and defaults to equals. To set it explicitly, set the pidSearchMethod value in the config.json file

It looks like this:

image

Motivation

Users often want to filter by PID. Supporting regexes on this field will be useful when the PID format will encode some information from the facility. This will be possible when we will allow defining dataset PIDs from the outside at dataset creation.

Changes:

Tests included/Docs Updated?

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)
  • Docs updated?
  • New packages used/requires npm install?
  • Toggle added for new features?
  • Requires update of SciCat backend API?

@minottic minottic changed the title Pid rev Filter by PID enabling different matching conditions May 16, 2023
@minottic
Copy link
Contributor Author

Currently this PR does 2 things: it reverts #1048 and implements the new PID filtering condition.
If you agree with this change, I will split this PR in 2 PRs, one reverting #1048 and the second implementing the new PID filter

@stephan271
Copy link
Member

Fine for me to do 2 PRs

@nitrosx nitrosx merged commit 3cdf113 into master May 17, 2023
@nitrosx nitrosx deleted the pid_rev branch May 17, 2023 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants