Remove content types from search result

If you are looking for a way to hide specific content types from the core Drupal search result then checkout the Search config module. It's a good idea to use this module if you are using the Content profile module so you can hide the profile node from appearing in your search result.

It does offer other functionality, but I'll just show you how to hide a content type from the search result.

To install this module just go to the Search config project page and download the module. Unzip the module into sites/all/modules directory. Then login with your administration account and enable the module.

To configure the module go to Search settings in the administration section.

fig 1

Scroll down to the bottom and open the collapsed fieldset called Advanced search configuration.

fig 2

To remove a content type from the search results, just tick the content type in both search form and search index fieldset.

fig 3

That's all what's required if you want to hide a content type from your search result. Both Apache Solr Search Integration and Search Lucene API module offer the same functionality.

Comments

Anonymous's picture

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <pre> <h2> <h3> <h4> <h5> <h6> <hr> <blockquote> <p> <br>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.

More information about formatting options