i am trying to optimize search result in on-premise search web parts.
m trying to get more efficient search result.
please suggest some best techniques.
You can Create Result Sources and Refinement,and Crawl and Manage Properties as well in your Farm . this will give most efficient result then Direct Query in Search web part. You can define all above OOTB
You have to define "optimize" and "efficient". From what perspective? As you said this is a development question then for more optimal query:
rowlimit, startrow, rowsperpage,etc.
There are other optimizations in search, but this appears to apply to your question.
Search in SharePoint 2013 includes a Search REST service you can use to add search functionality
You can use the set of features in it like:
You can use XRANK expressions to boost the query also.
Search with minimum payload can be achieved through it with much performance and reliability.
Perhaps this will provide some helpful information.
We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.
We actually facing the same performance issue since our current project is search-driven site. And we turn on three caching - BLOB, Object, and Output and it helps a lot.
And here's the link explain further how it optimized search.