Term query performance issue with respect to size parameter in search query

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.

Note : 1 .Could you please explain why size parameter increasing/decreasing performance based on value.

Because when setting size to 1000, each shard has to send 1000 documents to the coordinating node. Assuming you are using 5 shards, it means 5000 documents over the network then the coordinating node is merging the documents and send back to the client 1000 documents over the network.

That is probably why it is slower.

Please guide me how to improve the search performance.

Decrease the number of shards, keep size to 10... Increase the number of nodes and replicas... Many options but why 5555 request/sec looks a bad result to you?

1 Like