Records from all nodes are not searched by the custom plugin

Hi,

I have recently migrated a custom scoring plugin from ES 1.7.5 to version 7.5.2. The plugin works fine and gives expected results when running in a single node environment. The issue arrises when there are 2 or more nodes in the cluster. Ideally when the request is sent to one of the nodes, the results from all the nodes should be collated and sent back. But in my case, it appears that only the matching documents from the particular node requested is sent back. I found that if I replicate all shards on all nodes, I get the correct result (obviously because all the data resides in a single node)

I am aware that the SearchContext available in version 1.7 is no longer accessible and so have used QueryShardContext within the plugin code. Since the plugin works fine in a single node environment, I am not sure if there is a problem in my code or some additional setup has to be done on the ES server which is different from ES 1.7.

Thank you very much in advance

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.