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

fix: #17 Retrieve Beacon Facets when logged-in #18

Conversation

brunopacheco1
Copy link
Collaborator

Beacon facets must be retrieved if the user is logged in, no matter if the user is using or not beacon facets to filter the results.

The class BeaconDatasetsSearchService was altered to comply to this requirement:

  • if the user is not logged-in automatically CKAN query is triggered without enhancement. Check line 75.
  • If there are beacon queries we trigger a search on Beacon Network. Check lines 79 and 109.
  • if there are no beacon filters or beacon's resultsets is not empty, we query on CKAN. Check lines 81 and 134.
  • Beacon facets/filters are always inserted into CKAN output. Check lines 87 and 175.

With those rules, we are able to properly enrich CKAN output with beacon response, including facets and resultsets, if there is any.

Several different test cases were introduced to cover most of the scenarios.

Beacon facets must be retrieved if the user is logged in, no matter if the user is using or not beacon facets to filter the results.

The class `BeaconDatasetsSearchService` was altered to comply to this requirement:
- if the user is not logged-in automatically CKAN query is triggered without enhancement. Check line 75.
- If there are beacon queries we trigger a search on Beacon Network. Check lines 79 and 109.
- if there are no beacon filters or beacon's resultsets is not empty, we query on CKAN. Check lines 81 and 134.
- Beacon facets/filters are always inserted into CKAN output. Check lines 87 and 175.

With those rules, we are able to properly enrich CKAN output with beacon response, including facets and resultsets, if there is any.

Several different test cases were introduced to cover most of the scenarios.
@brunopacheco1 brunopacheco1 merged commit 0d239f7 into main Apr 16, 2024
3 checks passed
@brunopacheco1 brunopacheco1 deleted the 17-gdi-dataset-discovery-service-beacon-facet-group-is-not-retrieved-when-empty-query branch April 16, 2024 07:19
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.

[gdi - dataset-discovery-service] Beacon facet group is not retrieved when empty query
2 participants