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 ability to search by metadata properties #774

Open
8 tasks done
jamesrwelch opened this issue Mar 1, 2023 · 2 comments
Open
8 tasks done

Add ability to search by metadata properties #774

jamesrwelch opened this issue Mar 1, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request epic An issue representing a collection of other issues
Milestone

Comments

@jamesrwelch
Copy link
Contributor

jamesrwelch commented Mar 1, 2023

Reported by Eleanor Platt

Description

We'd like to add a new feature to the search to allow users to search for catalogue items with a particular metadata property value. Similar to the search in the explorer interface, where the filtering allows you to select data elements with a particular value. This could be implemented as a filter, but might be better implemented as a search term.

Additional context

I believe the backend functionality is already in place, but this might need confirming first!

The basic interface could let you choose a namespace / key, but we might think about making use of the profile definitions to make this easier to use. The profile endpoints may even be a good place to start...

Goals

The Mauro backend does currently support search filter/criteria for searching against metadata, via namespace/key and matching value. This is a start, but this should be expanded a bit. Considering that any metadata namespace could potentially be used, this search update should focus on profiles - these give structure to metadata and there are Mauro functions already available to ascertain what profiles are available and their definitions, which can reduce the possible scope for a user.

The goals of this update are:

  1. Allow the user to select one or more profile keys, with a value, to act as an additional filter to a search term.
  2. Be able to select a profile key from one or more profiles, allowing a mix-and-match filter.
  3. Send these profile filters to Mauro and convert to appropriate search criteria.
  4. Allow the user to initially select profile filters from the Search page, and then adapt them via the Search Listings page.

Tasks

@jamesrwelch jamesrwelch added the enhancement New feature or request label Mar 1, 2023
@pjmonks
Copy link
Contributor

pjmonks commented Mar 3, 2023

To confirm the question raised, having looked at the backend code there is functionality in Mauro to define a search filter for a metadata key/value in the format:

{
  "profileFields": [
    {
      "metadataNamespace": "...",
      "metadataPropertyName": "...",
      "filterTerm": "..."
    }
  ]
}

Sending this as part of the POST /api/catalogueItems/search endpoint allows this already, though some adjustment may be required. Current implementation is to always do a "phrase" search, which requires an exact match. Given the scope of possible metadata values, the "keyword" search criteria may need to be supported also to handle fuzzy searching.

@jamesrwelch
Copy link
Contributor Author

My proposal, which we've spoken about but I'll put in writing, is that we use 'phrase' matching for profile fields with an enumeration data type, and 'keyword' matching for other profile fields.

@NigelPalmer NigelPalmer added the epic An issue representing a collection of other issues label Mar 6, 2023
@pjmonks pjmonks added this to the 7.4.0 milestone Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request epic An issue representing a collection of other issues
Projects
Status: Merged to Develop / Waiting to release
Development

No branches or pull requests

3 participants