DataONEorg / collections-portals-schemas

Enabling project and data paper views via MetacatUI, Metacat, and EML
Apache License 2.0
3 stars 3 forks source link

Change the default operator within filters from `AND` to `OR`? #83

Closed robyngit closed 3 years ago

robyngit commented 3 years ago

It was decided that OR is a more useful operator to use when building filters with multiple values and/or multiple fields, but the FilterType default operator is currently set to AND. For this reason, we will update the UI so that any new filters that are built with it will explicitly set the OR operator. We need to decide whether we should change the default operator in the schema from AND to OR.

Things to consider:

  1. How to accommodate portals that already exist (since defaults aren't serialized), and what our policy will be in the future when further changes are made to the collectionQueries.
  2. We cannot make changes to the way collectionQueries are constructed in MetacatUI only, because the collectionQuery is also constructed in metacat-index, which is used by the metrics and quality services. So we have to update MetacatUI and Metacat with these changes at the same time.
  3. We could start using the Filter models in the main DataCatalogView as well as the portal search view, so whatever we decide should work there, too.
robyngit commented 3 years ago

Decided to make operator required element, always serialize the operator

robyngit commented 3 years ago

Think about separate operator for fields and values