如何按不可用的值过滤搜索
16lz
2021-01-22
I have a list of items as:
我有一个项目列表:
i = SearchQuerySet().models(Item)
now, each item in i
has a attribute, price
现在,i中的每个项目都有一个属性,价格
I want to narrow the result in which price information is not available along with the ones falling in a given range
我想缩小价格信息不可用的结果以及属于给定范围的价格信息
something like
就像是
i.narrow('price:( None OR [300 TO 400 ] )')
how can that be done?
怎么办?
5 个解决方案
#1
6
Try this:
尝试这个:
-(-price:[300 TO 400] AND price:[* TO *])
is logically the same and it works in Solr.
在逻辑上是相同的,它在Solr中工作。
更多相关文章
- Django 基础(一),项目创建、URL路由、数据库操作、模版
- 搭建linux服务器并部署java web项目(CentOS7+tomcat+Mysql)
- Linux服务器下用svn创建多个项目
- Linux系统Oracle12.2 RAC集群实施维护_Oracle数据库12cR2(项目实
- 项目九 Linux 磁盘管理
- Win10&Linux下Apache2+PHP7+Mysql安装以及创建Laravel项目
- Linux 下部署Django项目
- 项目连接MySQL数据库,提示异常
- 新导入项目数据库导入失败