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

Highlight Matched Field Behaviour #37

Closed
mitchdawson1982 opened this issue Mar 12, 2024 · 0 comments
Closed

Highlight Matched Field Behaviour #37

mitchdawson1982 opened this issue Mar 12, 2024 · 0 comments
Assignees
Labels
DataHub Issues relating to DataHub - https://datahubproject.io/

Comments

@mitchdawson1982
Copy link
Contributor

mitchdawson1982 commented Mar 12, 2024

Background

There are inconsistencies with the behaviour of matched fields within datahub for custom properties and how these are presented in the front end, this ticket serves to outline these behaviours with a view to fixing them at some point in the future. Datahub returns matched fields for each result. Matched fields is a list of dictionaries for each field.

Consensus is sought on whether we should display matched fields for applied filters or only fields matched through a query term and hide matched fields from search results if this is the case.

Inconsistencies

  1. Datahub returns applied filter fields and populated values as matched fields when a search term is present.

Image

This example indicates that the search term "analytical" was found within "Description, Domain, Sensitivity level" Fields. Sensitivity level was returned as a custom property matched field with a populated value of 'value': 'sensitivityLevel=OFFICIAL'.

Domain = HMCTS & Classification = Official applied and analytical query term present.
Matched fields returned:
[{'name': 'customProperties', 'value': 'sensitivityLevel=OFFICIAL'}, {'name': 'fieldDescriptions', 'value': 'convicted_rank and convicted_rank_desc are created at the level of the offence (see [here](https://github.com/moj-analytical-services'}, {'name': 'domains', 'value': 'urn:li:domain:31754f66-33df-4a73-b039-532518bc765e'}]

Note: Value field is populated.

  1. Datahub doesn't return populated filter fields values when no search term has been applied.

Image

In this scenario where a domain and custom property filter has been applied and no search term is included (NOTE: absence of "analytical"), datahub returns only the matched field names. This is insufficient to obtain the actual property that was applied for a custom property field. We are able to populate Domain as we only need the name, however this is not possible for customer properties where the actual applied property is missing.

Domain = HMCTS & Classification = Official applied and no query term present.
Matched fields returned from datahub:
[{'name': 'customProperties', 'value': ''}, {'name': 'domains', 'value': ''}]

Note: Value field is empty.

Potential Solutions

  1. Only display matched fields on search results when a query is present, effectively hiding it when no query has been applied.
  2. Remove filter matched fields so that only fields matched by a query are displayed
@mitchdawson1982 mitchdawson1982 self-assigned this Mar 12, 2024
@mitchdawson1982 mitchdawson1982 added the DataHub Issues relating to DataHub - https://datahubproject.io/ label Mar 12, 2024
@moj-data-platform-robot moj-data-platform-robot transferred this issue from ministryofjustice/analytical-platform Apr 25, 2024
@seanprivett seanprivett closed this as not planned Won't fix, can't repro, duplicate, stale Aug 12, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Data Catalogue Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DataHub Issues relating to DataHub - https://datahubproject.io/
Projects
Status: Done ✅
Development

No branches or pull requests

2 participants