tina 介绍
Elasticsearch 的 Python
client,提供较为方便的查询语法。
sql
select * from “ExampleModel” where “name” = “tina”
tina
models, total = ExampleModel.where(‘name’, equal=’tina’).fetch()
sql select * from “ExampleModel” where “category” = 1 or “category” = 3
order by “created_at” limit 20 offset 20
Python
models, total = ExampleModel.where(‘category’, contains=[1, 3])\
.order_by(‘created_at’).fetch(20, 20)