Skip to content

Add support for collapse param in Search #1215

Closed
@BANOnotIT

Description

@BANOnotIT

There's no method for collapse feature. Collapsing feature is vary usefull for building suggestions.

To use this feature right now in v7.0.0 of e-dsl I can use this workaround:

s = Search(...)
s = s.update_from_dict({'collapse': {'field': 'some.field'}})

It'll be much easier to use it in a way like that:

s = Search(...)
s = s.collapse('some.field', 'some.another.field')
s = s.collapse('some.complicated.field'={
  'inner_hits': ...,
  '...': ...
})

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