我正在尝试使用轮胎检查字段是否为空。这是我对我的模型的查询。
def self.search(params)
tire.search(load: true, match_all: {}, page: params[:page], per_page: 12) do
query do
boolean do
must { string params[:query], default_operator: "AND" }
must { term :online, true }
must_not { string 'name:Undefined' }
must_not { term 'price:null' }
end
end
end
end
must_not { term 'price:null' } is the code wich leads me to an error.
我能怎么做 ?谢谢