<p dir="auto">We recently started to use the cluster sniffing feature in the Java API for node discovery which works great. But in our cluster setup we have 3 nodes (out of 9) which have different hardware (disk, less iops) and those are causing performance problems when they have to handle requests. To solve the issue I disabled sniffing again and didn't connect to those 3 nodes.</p>
<p dir="auto">In order to still have node discovery in case a node is added or removed to/from the cluster it would be great to have an exclusion feature.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Settings.Builder settingsBuilder = Settings.settingsBuilder()
                .put(&quot;cluster.name&quot;, &quot;cluster&quot;)
                .put(&quot;client.transport.sniff&quot;, true).
                .putArray(&quot;client.transport.sniff.exclude&quot;, &quot;node1&quot;, &quot;node2&quot;, ...);"><pre class="notranslate"><code class="notranslate">Settings.Builder settingsBuilder = Settings.settingsBuilder()
                .put("cluster.name", "cluster")
                .put("client.transport.sniff", true).
                .putArray("client.transport.sniff.exclude", "node1", "node2", ...);
</code></pre></div>
<p dir="auto">So sniffing would detect every x seconds all the nodes in the cluster, but it will not connect to the ones which are excluded.</p>
<p dir="auto">I have a case where the completion suggester is omitting results, below are two example documents. For a search like "Samsung", only Document 1 will be returned. Actually its the only document returned, so the <code class="notranslate">size=10</code> is not reached. The only major difference i can is see is the weight, will the completion suggester omitt result if there's a huge difference in weight?</p>
<p dir="auto">Document 1:<br>
<code class="notranslate">{ "_index" : "suggester", "_type" : "suggestions", "_id" : "b089f7c6a85f39fb882398b6c8ba34c1", "_score" : 1.0, "_source":{"suggest":{"input":["Sm","Samsung Mobiles Tablets","Mobiles \u0026 Tablets","(Export) Galaxy Note 4 Sm","Galaxy Note 4 Sm","Note 4 Sm","4 Sm"], "output":62020, "payload":{"br":"Samsung", "ca":"Mobiles \u0026 Tablets", "cl":"N910C LTE 32GB White","co":"product","li":"http://one", "pr":"(Export) Galaxy Note 4 Sm","th":"thumb1.jpg"},"weight":63}} }</code></p>
<p dir="auto">Document 2:<br>
<code class="notranslate">{ "_index" : "suggester", "_type" : "suggestions", "_id" : "22480c43af984689f7254bda8d16f99a", "_score" : 1.0, "_source":{"suggest":{"input":["Samsung Mobiles Tablets","Mobiles \u0026 Tablets","Galaxy Note 4 Sm","Note 4 Sm","4 Sm","Sm"],"output":21970, "payload":{"br":"Samsung","ca":"Mobiles \u0026 Tablets","cl":"N910S LTE Black (Local warranty)","co":"product","li":"http://two", "pr":"Galaxy Note 4 Sm", "th":"thumb2.jpg"}, "weight":27}} }</code></p>