I have been experiencing some strange results, where in my views search results, some results are outputing duplicates with a date and excerpts, but no title.

Indexed fields : Title, Date, URL, Text Body

I created a similar view adding node ID to the results, strangely these results without a title also have a node ID of 0.Node ID was not indexed.

Anyone know what is happing?

Thanks

Comments

mediaformat’s picture

Title: Duplicate excepts and dates in Views » Duplicates in Views

Looking at the results, the duplicate(result) always appears immediately before the correct result.

There are some cases where only a date is returned.

Also, filtering duplicates per field(excerpt, date) does nothing.

mediaformat’s picture

Project: Search API Solr » Search API

Using Search API with Apache Solr not "Search API Solr Search" module.

mediaformat’s picture

Re-indexing does not affect results : #2445391: Duplicate results when sorting in a page with a pager

Views preprocess duplicate removal also has no impact #1223448: Distinct doesn't work when sorting by field with multiple values

mediaformat’s picture

Issue summary: View changes
mediaformat’s picture

Title: Duplicates in Views » Duplicates in Views and Solr Search
Component: Documentation » Framework

An update of what I have tested:

Views

  • Removed all Exposed filtres (except for Search: Fulltext search)
  • Loaded all Fields for which I have Filter Criteria

Search API - View Index - Filters

  • Disabled all Data Alterations
  • Disabled all Processors

Search API - View Server - Using Solr Service - Advanced

  • Disabled Return an excerpt for all results
  • Disabled Retrieve result data from Solr

The result is still an extra empty row in my View

mediaformat’s picture

Version: 7.x-1.6 » 7.x-1.14
mediaformat’s picture

Category: Support request » Bug report

So the duplicates I see are now only seen in admin mode.

Why certain nodes are duplicated remains a mystery

mediaformat’s picture

Issue summary: View changes
drunken monkey’s picture

Using Search API with Apache Solr not "Search API Solr Search" module.

The search_api and apachesolr modules are completely separate, they don't work together at all. If you are using the Search API with a Solr server, you have to be using (at least) search_api_solr. If you use that and apachesolr, this might explain your problems. If you are using search_api for your searches, you can uninstall the apachesolr module. Clear the Solr index afterwards (optimally, by emptying the index's data/ directory in the Solr installation) and the duplicate results will hopefully vanish.

Otherwise, please provide more details about your setup – especially, what type of Search API server are you using?

mediaformat’s picture

Title: Duplicates in Views and Solr Search » Duplicates in Views and Solr Search (Search API Solr)
Category: Bug report » Support request
Status: Active » Closed (works as designed)

If you are using the Search API with a Solr server, you have to be using (at least) search_api_solr.

My mistake, looking at the modules, I do have search_api, and search_api_solr.

If you are using search_api for your searches, you can uninstall the apachesolr module.

I had installed the module at some point...

Clear the Solr index afterwards (optimally, by emptying the index's data/ directory in the Solr installation) and the duplicate results will hopefully vanish.

I cleared the Solr Index and things seem to be normal.

Thanks

weynhamz’s picture

Why certain nodes are duplicated remains a mystery?

I am using search_api_db module, and the final SQL to get the results is ordered by 'score' AKA 'relevance', and the value of this field is the same for some records, with pager, the sort result is not stable, which will result a record appears in two different page range, but certainly, the duplicates will not show in the same page.

We'd better provide a second sort key which can result a stable sort.

For more detail, please see my comment in a relevant issue: https://www.drupal.org/node/2445391#comment-10743046