Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

split keywords by , in facet, then recalculate #1067

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pvgenuchten
Copy link
Contributor

Overview

This PR introduces a procedure which splits keywords by ',' and recalculates totals after db query
Similar mechanism could be used for other fields which are ,-separated
I see 2 alternatives for this PR:

  • keywords not to be stored as concatenated string, but actual list
  • introduce an in-db procedure to split the keywords-string as part of the facet query

Related Issue / Discussion

resolves #1065

Additional Information

image

Contributions and Licensing

(as per https://github.com/geopython/pycsw/blob/master/CONTRIBUTING.rst#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pycsw. I confirm that my contributions to pycsw will be compatible with the pycsw license guidelines at the time of contribution.
  • I have already previously agreed to the pycsw Contributions and Licensing Guidelines

@pvgenuchten
Copy link
Contributor Author

we found an interesting side effect here (potentially related)

if a term contains a space, the aggregated statistics provide a much higher number then when you filter by that term

image
after filtering by 'water holding capacity'
image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ogcapi-records] keywords facet should split keywords to list
1 participant