Drupal 6.20 according to the changelog file.

We took over a site from another company who built the site in Drupal, and we'll be converting it over to Wordpress eventually but we need to resolve the search issue first.

I get the "You must include at least one positive keyword with 3 characters or more." error message whether I use the search bar (search module) which leads you to "search/node/KEYWORD" with KEYWORD being your search parameter or if I just go to /search after the URL.

I've read about this and have tried all the suggestions that I saw and none have resolved the issue. I re-indexed the site, and ran cron.php. After I ran cron.php I looked at the settings again and it shows that 100% of the site has been indexed.

I also manually changed the search module status in the database, but it only made the search bar disappear and after I changed the status back to active I got the same result. I tried that because it worked for another module that wasn't working on startup.

The entire site and DB was copied over, and the site that is on the other company server the search functions properly. I don't think it's php version related because I ran a script to revert back to PHP 5.3. Does anyone have any suggestions on what else I might try to possibly get the search working?

  • Could it simply be related to the URL not matching? The domain name hasn't transferred to us yet, and the URL on our side where the search doesn't work is of course different from the main URL.
    – breinhart
    Feb 11 '16 at 21:04

The search module is a little weird in Drupal, and can take some time to wrap your brain around. If you start reading from node_search(), you will see a call to do_search() which is the function that links the search indexes to the things you are searching over.

If you read that function, you will see that there is a variable minimum_word_size, that defaults to 3. If you need to be able to search on smaller words, you need to set this smaller. I believe you can set this on 'admin/settings/search', but I don't have any Drupal 6 sites to check against.

Change this value, then wipe the search index and rebuild it. These last two steps are most easily accomplished with Drush.

  • Thank you for taking the time to reply. You're exactly right on the directory to change the search settings. I changed the "Minimum word length to index" from 3 to 2, saved the configuration, wiped, and re-indexed. In the indexing status I'm showing 100% of the site has been indexed. I previously tried this but did not change the Minimum word length but I'm getting the same result. The file where you reference the functions you mentioned could you give me an idea of where to look for it, and what the file name is? I had luck re-uploading files on modules that were acting funny.
    – breinhart
    Feb 10 '16 at 19:10
  • I found the directory modules/search and re-uploaded everything again, but it didn't change anything.
    – breinhart
    Feb 10 '16 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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