how to filter search by values that are not available

后端 未结 5 2295
逝去的感伤
逝去的感伤 2021-02-20 06:11

I have a list of items as:

i = SearchQuerySet().models(Item)

now, each item in i has a attribute, price

I wan

5条回答
  •  没有蜡笔的小新
    2021-02-20 06:41

    One can use a filter query if you do not care about the document score and want to leverage the filter cache, like:

    ?q=*:*&fq=((-price:[* TO *]) or (price:[300 TO 400]))
    

提交回复
热议问题