我正在尝试使用Perl的Elasticsearch Percolator,我找到了这个很酷的模块.
此处列出了渗透方法
据我所知,它们只是读取方法,因此只能读取查询索引并查看查询是否已存在,计算匹配的查询等.
除非我遗漏了某些内容,否则无法通过Percolator接口添加查询,因此我所做的是使用普通方法创建针对.percolator索引的文档,如下所示:
my $e = Search::Elasticsearch->new( nodes => 'localhost:9200' ); $e->create( index => 'my_index', type => '.percolator', id => $max_idx, body => { query => { match => { ...whatever the query is.... }, }, }, );
这是通过perl模块向percolator索引添加查询的最佳方法吗?
谢谢!