Skip to content

Facet quirks #45

@stephenwf

Description

@stephenwf

The following are metadata values from IIIF, and the resulting facets.

Example 1

This is an ideal case. Where each label/value pair has a matching label/value language. This is where the filtering could work and only show the facet. However it does produce 3 facets for what is conceptually one value. Having some equivalency could help filter (server or client side)

{
    "label": {
        "en": ["Title (en)"],
        "nl": ["Title (nl)"],
        "none": ["Title"]
    },
    "value": {
        "en": ["Dumfriesshire (en)"],
        "nl": ["Dumfriesshire (nl)"],
        "none": ["Dumfriesshire"]
    }
}

Screenshot 2021-11-02 at 11 07 49

Example 2

Distinct to the above example, where there is only one language in the label, these facets appear grouped together again, with each value distinct in the facet list. I suspect that a mix of this and example 1 may fragment facets. A facet list that was previously working could be broken by adding a language (split into 2).

{
    "label": {
        "en": ["Second test"]
    },
    "value": {
        "en": ["Second test (en)"],
        "nl": ["Second test (nl)"]
    }
}

Screenshot 2021-11-02 at 11 09 04

Example 3

This is straight up a bug or undefined behaviour. There are english 2 values for label, and search seems to pick neither.

{
    "label": {
        "en": ["Third test", "Third test (en2)"]
    },
    "value": {
        "none": ["Third test"]
    }
}

Screenshot 2021-11-02 at 11 10 01

Example 4

This is the opposite to Example 2 where we have 2 labels instead of 2 values. Here the facet is not split. There are not 2 values for each.

{
    "label": {
        "en": ["Fourth test (en)"],
        "nl": ["Fourth test (nl)"]
    },
    "value": {
        "en": ["Fourth test"]
    }
}

Screenshot 2021-11-02 at 11 11 13

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions