mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-25 01:19:02 +00:00
This test requires a mapping since otherwise if there is no mapping added the percolator query might not be parsed as a query on a numeric field since the query might arrive on a node before the dynamic mapping reached that node. This commit also moves the `indexService.readAllowed()` call up before the number of percolation queries is check to make sure we fail if reads are not allowed - there might be a query in-flight which means we need to check another node rather than return an empty result.