Skip to content
Snippets Groups Projects
Commit af410cb8 authored by Nesta Campbell's avatar Nesta Campbell
Browse files

Notes on removing content from the search index.

parent 2b16f410
No related branches found
Tags 6.x-1.5
No related merge requests found
......@@ -4,15 +4,17 @@ search_config is used to configure the advanced search form.
Installation
------------
1. Copy entire search_config directory to the module directory of your Drupal
installation
2. Enable the search_config module on the admin modules page
3. Go to administer » settings » search, you should now see a
3. Go to administer » Search Configuration, you should now see a
"Advanced search form configuration" collapsed fieldset.
General Information
-------------------
This module started out as a simple means of configuring the *display* of the
advance search form. A few features have been added since thanks to the
contributions of others.
......@@ -42,3 +44,23 @@ form globally or on role by role basis:
Some of what this module does can also be achieved by theming the form.
Removing nodes from the search index
------------------------------------
A feature offered by this module is to stop the indexing of specific node types.
There is no easy way to do this is Drupal. Items can be removed from the search
index though and this was the original method that was used. This worked by
deleting values of the selected type from the search index using the
search_wipe function in hook_update_index. This proved problematic, especially
in cases where search_config was installed on a site with a lot of content. No
throttling was enabled in the hook and this caused cron to crash. It also
posed the problem of search_config playing catch-up in removing the items from
the index since there was no way to prevent them from getting there in the
first place. I gave up on this approach.
Items are no longer removed from the index but instead hook_db_rewrite_sql is
used to prevent select content types from showing up in search results. This
is a ugly and hack but it provides the desired result. If you want to help solve
this issue of preventing indexing of content plese see this issue:
http://drupal.org/node/111744
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment