Skip to content

JSON:API - Optimize facet output #46

@ewlarson

Description

@ewlarson

Our current facet implementation duplicates a lot of "text", with labels and values and so many links.

    "type": "facet",
      "id": "dct_language_sm",
      "attributes": {
        "label": "Dct Language",
        "items": [
          {
            "attributes": {
              "label": "English",
              "value": "English",
              "hits": 5970
            },
            "links": {
              "self": "https://lib-btaageoapi-dev-app-01.oit.umn.edu/api/v1/search?q=&include_filters%5Bdct_language_sm%5D%5B%5D=English"
            }
          },

We could optimize the facet response to something like:

"items": [["Wisconsin",13648], ["Indiana",12693], ...]

And! Perhaps we even skip the link generation — leaving that for the client logic to implement??

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions