0

The built-in search feature in my Drupal site is not working. After looking online, the only solutions I've seen are to "0% of the site has been indexed" but with "x items left to index" (x>0).

My question is how do I make my site "notice" things to index?

Here's a picture of the error I get:

enter image description here

Update: I'm working with Drupal 7.

5
  • are you trying on localhost? Jul 5, 2015 at 14:01
  • @AlirezaTabatabaeian as I don't know what that means, probably not. My site is hosted by pantheon.io
    – Exterior
    Jul 5, 2015 at 14:05
  • when the site has gone online? does your site have any contents? what Drupal done for indexing is when site is relax and there are not too many request it fetch some data and make indexes , now if you just recently have started your site or you don't have any content on it , these are two things that may caused the problems . Jul 5, 2015 at 14:16
  • Have you written any redirect script within node body? Jul 20, 2015 at 13:31
  • @VishalPatil I don't know anything about scripts. I'm just using the primitive options through the toolbar. My drupal site is hosted by Pantheon.
    – Exterior
    Jul 20, 2015 at 13:54

1 Answer 1

2

Here are a few things you should check:

  • On the Search settings page (located at admin/config/search/settings), make sure Node is checked (enabled) as an Active Search Module.

  • On admin/reports/status, verify when your cron job was last executed. And use the link 'run cron manually' on that page to manually trigger the cron job to be run.

  • Disable the "PHP Filter" module (used for nodes that use the "PHP Code" input format), to not get stuck because of some bad PHP code stored in a node. Because nodes containing PHP can cause problems with search indexing.

  • Clear the cache.

  • Check the Drupal log for possible errors related to it.

Some more excerpts from Search module: an internal site search system, related to Re-indexing:

  • Content-related actions on your site (creating, editing, or deleting content and comments) automatically cause affected content items to be marked for indexing or reindexing at the next cron run. When content is marked for reindexing, the previous content remains in the index until cron runs, at which time it is replaced by the new content.

  • Unlike content-related actions, actions related to the structure of your site do not cause affected content to be marked for reindexing. Examples of structure-related actions that affect content include deleting or editing taxonomy terms, enabling or disabling modules that add text to content (such as Taxonomy, Comment, and field-providing modules), and modifying the fields or display parameters of your content types. If you take one of these actions and you want to ensure that the search index is updated to reflect your changed site structure, you can mark all content for reindexing by clicking the "Re-index site" button on the Search settings page (administer >> site configuration >> search settings in Drupal 6, or administer >> configuration >> search and metadata >> search settings in Drupal 7).

If none of this helps, then you may also want to look at issue # 1715366 (which started in D7 ...) for other possible causes of your issue.

PS: what happens if you run the cron job, eg by triggering it from the admin screens?

1
  • I checked both of the things you mentioned and they're set as you said (ran cron too). Still though, no search results.
    – Exterior
    Jul 5, 2015 at 16:52

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.