src/sap.ui.documentation/src/sap/ui/documentation/sdk/controller/util/SearchUtil.js
function search(sQuery) {

			return new Promise(function(resolve, reject) {
				init().then(function() {

					oWorker.addEventListener('message', function(oEvent) {
						var oData = oEvent.data;
						resolve(oData && oData[WORKER.RESPONSE_FIELDS.SEARCH_RESULT]);
					}, false);

					oWorker.postMessage({
						"cmd": WORKER.COMMANDS.SEARCH,
						"sQuery": sQuery
					});
				});
			});
		}
function search(sQuery) {

			return new Promise(function(resolve, reject) {
				init().then(function() {

					oWorker.addEventListener('message', function(oEvent) {
						var oData = oEvent.data;
						resolve(oData && oData[WORKER.RESPONSE_FIELDS.SEARCH_RESULT]);
					}, false);

					oWorker.postMessage({
						"cmd": WORKER.COMMANDS.SEARCH,
						"sQuery": sQuery
					});
				});
			});
		}
function search ( sQuery ) { return new Promise ( function ( resolve , reject ) { init ( ) . then ( function ( ) { oWorker . addEventListener ( 'message' , function ( oEvent ) { var oData = oEvent . data ; resolve ( oData && oData [ WORKER . RESPONSE_FIELDS . SEARCH_RESULT ] ) ; } , false ) ; oWorker . postMessage ( { "cmd" : WORKER . COMMANDS . SEARCH , "sQuery" : sQuery } ) ; } ) ; } ) ; }
Initiates search and return a promise with the search result

@param sQuery the search string
@returns {Promise<any>}
Initiates search and return a promise with the search result