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