my $response = $elastic->do_request_new( { query => { filtered => { filter => { or => [ { term => { _type => { value => "some_val1" } } },{ term => { _type => { value => "some_val2" } } },] },query => { query_string => { query => $qstring,rewrite => "scoring_boolean",analyze_wildcard => "true",} } } },sort => [ qw(_score) ],size => 50,},);
我的更新看起来像:
my $response = $elastic->do_request_new( { query => { bool => { should => [ { term => { _type => { value => "some_val1" } } },],must => { query_string => { query => $qstring,} } } },);
但是,在我的d性数据库中搜索确切的字符串时,我返回零结果:
{ "took" : 3,"timed_out" : false,"_shards" : { "total" : 5,"successful" : 5,"Failed" : 0 },"hits" : { "total" : 0,"max_score" : null,"hits" : [ ] }}
关于可能发生的事情的任何想法?我的猜测是我的查询结构错了.谢谢!
解决方法 更新:以下固定查询:my $response = $elastic->do_request_new( { query => { bool => { must => [ { query_string => { query => $qstring,rewrite => "scoring_boolean",} ],filter => { bool => { should => [ { term => { _type => { value => "some_val1" } } },{ term => { _type => { value => "some_val2" } } },);总结
以上是内存溢出为你收集整理的从2.4升级到5后,Perld性查询中断全部内容,希望文章能够帮你解决从2.4升级到5后,Perld性查询中断所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)