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.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityYou 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:
Accept: application/json;odata=verbose
SelectProperties
)bypassresulttype=true
rowlimit, startrow, rowsperpage,
etc.Accept-Encoding: gzip,deflate
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
http://server/_api/search/query?queryparameter=value&queryparameter=value
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 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.
The benefit turning on caches for search driven site: "BLOB cache - used to cache JavaScript, CSS, images files, and large rich media files. Should be used when pages are visited frequently. You don't have to worry about object cache (it's automatic). Use BLOB when you have large images, css, JS, media files which are viewed/used often (e.g. home page). Use Page cache if you have pages with "static context" (not changed very often) and you have many users visiting them. Also you can use HttpContext.Cache to cache at least some result from SQL queries or other data sources to speed up loading. In general, you should use caching when page is visited often and it is costly (time or computational resources) to generate it. "
And here's the link explain further how it optimized search.