我已经为Elasticsearch编写了以下查询,它可以正常工作
es = self.get_elastic_search_instance()
s = Search(using=es, index="school", doc_type = "student") \
.filter("term" , studentId = student_ID ) \
.filter("term" , isPremium = premium_search ) \
.filter("geo_bounding_box", location = { "top_right" : {"lat": x2, "lon": y2 },
"bottom_left" : { "lat": x1, "lon": y1 }}) \
.query("range", termFees = { "from": min_fee, "to": max_fee })
if course_query:
s = s.filter ("terms" ,courseId = [1302 , 1303 ] )
我想增加两个限制
如何包括他们,我尝试了几个选项它没有工作。你知道吗
您需要像这样编写多个
should filters
,|
是或(should)运算符希望这有帮助!!你知道吗
相关问题 更多 >
编程相关推荐