Difference between must_not and filter in elasticsearch

后端 未结 2 1120
天涯浪人
天涯浪人 2021-02-20 06:22

Can someone explain to me what the difference between must_not and filter is in elasticsearch?

E.g. here (taken from elasticsearch definitive guide), why isn\'t must_not

2条回答
  •  独厮守ぢ
    2021-02-20 06:55

    Basically, filter = must but without scoring.

    must_not expresses a condition that MUST NOT be met, while filter (and must) express conditions that MUST be met in order for a document to be selected.

提交回复
热议问题