Function percolate

Source
pub async fn percolate(
    configuration: &Configuration,
    index: &str,
    percolate_request: PercolateRequest,
) -> Result<SearchResponse, Error<PercolateError>>
Expand description

Performs a percolate search. This method must be used only on percolate indexes. Expects two parameters: the index name and an object with array of documents to be tested. An example of the documents object: { \"query\": { \"percolate\": { \"document\": { \"content\":\"sample content\" } } } } Responds with an object with matched stored queries: { 'timed_out':false, 'hits': { 'total':2, 'max_score':1, 'hits': [ { '_index':'idx_pq_1', '_type':'doc', '_id':'2', '_score':'1', '_source': { 'query': { 'match':{'title':'some'} } } }, { '_index':'idx_pq_1', '_type':'doc', '_id':'5', '_score':'1', '_source': { 'query': { 'ql':'some | none' } } } ] } }