Skip to content

How to make search results and facets use collapsed fields? #1136

Open
@PAK90

Description

@PAK90

I want to add this to the search;

      collapse: {
        field: "name",
        inner_hits: {
          name: "latest_document",
          size: 1,
          sort: [
            { releaseDate: "desc" }
          ]
        }
      },
      aggs: {
        "total_distinct": {
          cardinality: { field: "name" }
        },
      },

However adding it to the config for the SearchProvider doesn't work. Is it at all possible to make this library work with collapsed fields and with a custom aggregation for bucket counts? If so, how?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions