Here is how to easily create a custom page with facets for searching and filtering content for a specific content type.

  1. Add a new view and under Show select "Apache Solr search"

  2. Fill in other settings as you like

  3. In the view add a filter 'Apache Solr: entity_type'; under setting set operator to > is equal to "node"

  4. In the view add a filter 'Apache Solr: bundle'; under setting set operator to > is equal to [machine name of content type]

  5. Add the fields you want to display

  6. Create a Panels page: add the view you just created, add the facets you want to display

  7. le voila: you have a faceted search page for a specific content type

Comments

mausolos’s picture

... (at least for users). Providing any arguments for filters simply causes no results to show, and the occasional 400 error from SOLR.

-C

"It would be a dangerous undertaking for persons trained only to the law, to constitute themselves final judges of the worth of pictorial illustrations."
-- Justice Oliver Wendell Holmes Jr.

MiroslavBanov’s picture

@mausolos Double-check your solrconfig/schema. You are welcome to file a ticket in issue queue and elaborate on the problems.






来自  https://www.drupal.org/node/2473441