how to remove duplicate from views' result page
What actually worked is the following

function mymodule_query_alter($query) {

  if (isset($query-&gt;alterMetaData)) {
    if (isset($query-&gt;alterMetaData['view'])) {
      if($query-&gt;alterMetaData['view']-&gt;name == 'node_search') {
        $fields =&amp; $query-&gt;getGroupBy();
        // Tried various fields to check which was the field creating the problem.
        unset($fields['score']);
        $query-&gt;groupBy('nid');
      }
    }
  }
}


Answer found at http://www.brenthartmann.com/blog/how-use-hookqueryalter-drupal-7

PS: In order to check the sql query that produces your view, you need to go to admin/structure/views/settings and enable "Show the SQL query".