I am hoping I am missing a simple setting somewhere, but for some reason, the core search that comes with Drupal is not working as intended. I am just starting to build the site, but figured the search should work from the beginning.

I am running poormanscron so its being indexed (unless it doesn't index while the site is offline)

Basically I am using the Content Profile module to turn my user profiles into content.

consider the following 2 users in my site and some of their CCK fields:

(I am also using auto nodetitle module to turn the username into the title of the node)

Username - trickytom
Real Name - Tom
State - Kentucky
Company - Sears
Group - Grifters

Username - jazzyjeff
Real Name - Jeff
State - Kentucky
Company - JC Penney
Group - Grifters

So with this little data in the db, the search isn't acting properly. I am only speaking of the content tab search, not the user tab since all of this info in the profile should be searchable right?

If I search for "trickytom", I get Tom's profile, If I search for "jazzyjeff" I get Jeff's profile. Works fine right?

Now if I search for "Grifters", only Jeff's profile comes up. If I search for "Kentucky", 0 results are shown.

The search feature is one of the most important of my site, so am I missing something basic?

Thanks in advance,

Cincy ~

Comments

cincy_kid’s picture

one of the users has the value "Cartographer" for the job title cck field.

The user's profile will not come up in the search unless I spell the entire word.

So..

"Cart" - 0 results
"Carto" - 0 results
"Cartograph" - 0 results
"Cartographer" - 1 result (the correct profile)

Drupal doesn't search for partial words?

EDIT - Have also verified that the search_index table is filled with data that should be showing up in my searches..

WorldFallz’s picture

No, core search doesn't search partial words by default. You need to add a stemmer module like http://drupal.org/project/porterstemmer.

Also, there's no need to guess-- you can see exactly how much of your site is indexed at admin/settings/search. If it doesn't say 100%, then the site is not completely indexed.

You may wish to consider one of the advanced search modules like http://drupal.org/project/apachesolr or http://drupal.org/project/luceneapi. I use the latter and it works great-- even on shared hosting.

cincy_kid’s picture

Thank you Worldfallz for the reply!

I did not know about the partial words thing and cool, i will check out the stemmer mod you suggested.

Also, will check out the advanced search modules.

Again, thakn you for the info - I will post back later on my results.

PS - Love your sig ("Help Vampires" FTW!)

cincy_kid’s picture

I have the stemmer and the lucene goin now and i have one main question.

Do I have to have all these darn tabs in my search? not only do I still have the "Content" and "Users" tab, but now it has added a "Search Lucene" tab. I dont want users to have to pick. I just want one search box that searches everything...

I guess I will look into using the hook_menu_alter to remove the tabs or some other method and let you know how it goes ~

"...one world, one browser, one search module?..." ;)

WorldFallz’s picture

I'm pretty sure there's a hijack the core search option somewhere in the search lucene settings.

cincy_kid’s picture

yes, there is...i skipped right over it thinking its not what i wanted, but after further review, I think it may be just the thing, thanks again WF!