Skip to content

Adding tags to file in draft of published dataset doesn't add them to tag filter facet #6095

@qqmyers

Description

@qqmyers

Looks like the logic deciding whether files in the draft version should be indexed separately from the same file in a published version only considers the name, description, and dir label when deciding if there have been any metadata changes (if no change, only the published version, in this case without tags, gets indexed, which then means the tag filter facet doesn't count them, resulting in missing tags and/or low tag counts in the filter for the draft dataset.)

I think the fix is just to fix the contentEquals() method being used to account for everything that gets indexed. (tags look like the big one, but variable metadata, which can now change, is also indexed, as are things like hash algorithm/value (also changeable) and parent dataset name).

Without looking further, I'm not sure what would make a filemetadata's variable metadata 'equal' (getVariableMetadatas and get VarGroups lists have entries that can be matched 1-to-1 by scanning through them?), and I'm not sure it is worth addressing the rest (is parentName in the index ever used such that it is worth having new docs for all files just because the dataset name changes?) so I'll propose to fix the tag issue that affects filtering now and let other issues be created to address the rest.

Metadata

Metadata

Assignees

No one assigned

    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