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

[1] Align articles/events filters on API faceting principles #121

Open
agnesgaroux opened this issue Mar 19, 2024 · 0 comments
Open

[1] Align articles/events filters on API faceting principles #121

agnesgaroux opened this issue Mar 19, 2024 · 0 comments

Comments

@agnesgaroux
Copy link
Contributor

agnesgaroux commented Mar 19, 2024

https://github.com/wellcomecollection/docs/tree/main/rfcs/037-api-faceting-principles
See Principle 1.

Filters are named by the JSON paths of the identified object that they filter or, if applied to an attribute other than the identifier, the path of that attribute

This is not something that has been abided by in content-api:
NOTE: this example is articles but same thing with events
Article doc XkvmsREAACUAUWwN has a filter object like

        "filter": {
            "contributorIds": [ // should be "contributors.contributor"
              "XjQP8BQAACQANdYu",
              "XjFs8xQAACMAKkcQ"
            ],
            "formatId": "W7TfJRAAAJ1D0eLK",  // should be "format"
            "publicationDate": "2020-02-27T11:31:56.000Z"

and display

 "display": {
      "type": "Article",
      "id": "XkvmsREAACUAUWwN",
      "title": "The ‘undesirable epileptic’",
      "caption": "Abused in her marriage for being 'a sick woman', Aparna Nair looked to history to make sense of the response to her epilepsy. 
She discovered how centuries of fear and discrimination were often endorsed by science and legislation.",
      "format": {
        "type": "ArticleFormat",
        "id": "W7TfJRAAAJ1D0eLK",
        "label": "Article"
      },
      "publicationDate": "2020-02-27T11:31:56+0000",
      "contributors": [
        {
          "type": "Contributor",
          "contributor": {
            "type": "Person",
            "id": "XjQP8BQAACQANdYu",
            "label": "Aparna Nair"
          },
          "role": {
            "type": "EditorialContributorRole",
            "id": "WcUWeCgAAFws-nGh",
            "label": "Author"
          }
        },
        {
          "type": "Contributor",
          "contributor": {
            "type": "Person",
            "id": "XjFs8xQAACMAKkcQ",
            "label": "Tracy Satchwill"
          },
          "role": {
            "type": "EditorialContributorRole",
            "id": "XVQa_xMAACMAqbwo",
            "label": "Illustrator"
          }
        }
      ],
    }

This entails

  • changing the transformers
  • reindexing the data
  • change the value of filters/aggs in the API
  • wc.org to use new values for query params
@agnesgaroux agnesgaroux changed the title Align articles/events filters on API faceting principles [1] Align articles/events filters on API faceting principles May 22, 2024
@rcantin-w rcantin-w moved this to Backlog in Digital experience Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant