How to override node_search_execute() to implement partial matching search? I would like to override node_search_execute, so the search query will find partial match of a word instead of full word match i.e coffee, I would like partial match coff should return coffee result. 

How can I override node_search_execute() to implement partial matching search?
hook_search_execute() is a hook that modules integrating with the Search module implement to execute the search. As such, hook_search_execute() is invoked only for those modules that have a tab in the search page, not for every modules implementing it. Since the Search module doesn't use hook_search_execute_alter() there isn't a quick method to totally override node_search_execute().

There are some way to make Drupal call another function instead of node_search_execute(), but those involve writing code. The quicker is probably altering the search/node menu to change the page callback, which normally is
search_view().

foreach (search_get_info() as $module =&gt; $search_info) {
  $path = 'search/' . $search_info['path'];
  $items[$path] = array(
    'title' =&gt; $search_info['title'],
    'page callback' =&gt; 'search_view',
    'page arguments' =&gt; array($module, ''),
    'access callback' =&gt; '_search_menu_access',
    'access arguments' =&gt; array($module),
    'type' =&gt; MENU_LOCAL_TASK,
    'file' =&gt; 'search.pages.inc',
    'weight' =&gt; $module == $default_info['module'] ? -10 : 0,
  );
  $items["$path/%menu_tail"] = array(
    'title' =&gt; $search_info['title'],
    'load arguments' =&gt; array('%map', '%index'),
    'page callback' =&gt; 'search_view',
    'page arguments' =&gt; array($module, 2),
    'access callback' =&gt; '_search_menu_access',
    'access arguments' =&gt; array($module),
    // The default local task points to its parent, but this item points to
    // where it should so it should not be changed.
    'type' =&gt; MENU_LOCAL_TASK,
    'file' =&gt; 'search.pages.inc',
    'weight' =&gt; 0,
    // These tabs are not subtabs.
    'tab_root' =&gt; 'search/' . $default_info['path'] . '/%',
    // These tabs need to display at the same level.
    'tab_parent' =&gt; 'search/' . $default_info['path'],
  );
}


Since the goal you are trying to achieve is allowing searching by partial matching, you just need to install one of the modules that allows this, such as:


The Porter-Stemmer module
The Fuzzy Search module
The Apache Solr Search Integration module


The first module is the lighter one, since it doesn't depend from other modules, while the second one requires the Search API module, which in turn requires the Entity API module; the third one integrates with Apache Solr, and it is just a possibility for you if you have a server running Apache Solr. The Search API module also integrates with Apache Solr.

Reference


Drupal 7: Partial word search