In Alfresco 5.0.x (may be other versions of Alfresco), if a search term is not found in the Solr index, the basic search provides the result for the closest term that matches in the index. For example, if the search term is "1234567" and if nothing matches in the index then basic search presents the result from the closest match such as "1234566". If a user does not pay close attention then it might lead to the confusion. Therefore, I had a business requirement to disable that feature. This can be easily achieved by changing a value in the search.get.js. Please follow these steps to disable it.
1) In Alfresco 5.0.x, search related scripts are packaged in "alfresco-remote-api-5.0.x.jar", therefore you need to unzip this jar to get the required files.
2) Copy "alfresco-remote-api-5.0.3/alfresco/templates/webscripts/org/alfresco/slingshot/search/search.get.js and search.lib.js" files into "tomcat/shared/classes/alfresco/extension/templates/webscripts/org/alfresco/slingshot/search" folder, If folder does not exist please create folders.
3) Make following changes in the search.get.js file indicated in red.