3

Is there a way to show the facet filter, even if the Search API module returns no result?

1
  • I know there a way to display a 'facet block' that will display facets ... I thought every facets would be displayed within this block, but It only lists 10 facets among the 14 it should have list (in my case)
    – Math666
    Jun 23, 2015 at 12:22

2 Answers 2

3

Not really, the facets (both search api and solr) are made up from the results of the search, therefore if there are no results then it doesn't know what to populate the facets with.

Depending on your expected output you may be best creating a custom/views block to display some relevant content then re-write the urls to conform with the search query, acting like a search facet.

1

If you're using search_api_db, then you could use this patch :

https://www.drupal.org/node/2219897

It will add an option in your search server settings tyo allow a facet block to display facets even if there's no results !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.