Perl Module for Elastisearch Percolator

I am trying to use Elcosearch Percolator with perl and I found this cool module .

Percolation methods are listed here.

As far as I can tell, they just read the methods, so you can only read the query index and see if there is a query, count match requests, etc.

If I am missing something, it is not possible to add queries through the Percolator interface, so I used the usual method to create a document with the .percolator index, as shown below:

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.... }, }, }, ); 

Is this the best way to add a query to the percolator index through the perl module?

Thanks!

+5
source share
1 answer

According to DrTech's answer, the code I posted looks in the right way.

0
source

Source: https://habr.com/ru/post/1208268/


All Articles