Search code examples
drupalsolrfacet

Drupal Solr is indexing, but not showing any search results


I have a Drupal 7.17 installation running with Apache Solr installation (3.6.2) and Facets. The facets seem to work perfect, but when I navigate to the search page (with or without facets selected), no results are shown. Anybody an idea what could cause this?


Solution

  • Ok, after hours of searching, I was finally able to fix the bug. If anybody bumps into the same problem, here it is: When using the facet api module in combination with Apache solr, you'll see the following options when creating facets under the Apache Solr settings in Drupal:

    • show facet blocks on non-search pages (checkbox)
    • show facets blocks on the following pages (textarea)

    I had the checkbox enabled, and as I wanted to show the facet block on all pages, I entered * in the textarea. The problem however is (I guess), that facet block are then rendered twice on search pages (but you only get to see them once) and messing up the solr query, resulting in no search results.

    So, obviously, what I did to solved this issue, was removing * from the textarea, and setting the paths where I wanted to display the facets (all, expect the search pages).