Drupal Search Options Suck! See what i think...!
I am a web developer, recently converted to the open source CMS from .NET. My problem is, i have gone far on a Drupal Web solution that sells products and services. Now let me state it in the best possible English i can (forgive my French!). I am using Drupal 5.x anyways.
1. I used CCK for most of the custom content types, Products added by clients do not show on Search operations!
2. Can i create different tabs to search different content, such as Products, Services, Blogs and Forums?
3. Can i perform a search only on a chosen node, and be able to exclude all other nodes?
I kinda feel the developers here have neglected the search aspect of drupal. its so inflexible, uncustomizable and unscalable. Why would someone not delevop a module that will revolutionize the way search is done on Drupal? One cannot even search profiles by Location, Date, Zodiac, Etc. Aint this a shame on us, Drupal Community?
Someone help or i die!
"The victor will never be asked if he said the truth!"
Mark

I agree that the
I agree that the customisation options for search are not very good, but your cck content types should be searchable. Are you running cron,php regularly, particularly after a product is added? This reindexes the search db for new content
I believe there is a feature request to add a lot more customisation options to the search module. There are some articles on controlling the output via themes - this allows you to remove references to certain node types, but is less than perfect.
The advanced search page is good, but sometime you dont want to expose all of you vocab and content types to the user - this is becoming more of a problem as cck node types become used for more and more types of content.
Sorry that I cant tell you that the search facility can do what you want out of the box, but I guess anyone is free to contribute to the project, perhaps you would like to build a search enhancement module?
Can someone take up the challenge?
I wish i could, but PHP scares the living daylight out of my ass! But i promised me that soon as this project is over, i will plant my ass on some rock solid chair and make this contribution. I hope transition from ASP.NET to PHP will not be super difficult.
I agree with the above
I have also added a 'biography' field to the profile and this does not appear to get indexed for search. The ability to add additional fields to the profile as part of core in 5 was excellent, but surely rather limited if they cannot be searched as part of the standard search?
I have also tried the code given on the forum to remove content types from search results but this does not work for me with 5.1 :-(
i think one of the summer of
i think one of the summer of code projects is to improve drupal search functionality. Perhaps you should mention these things on the group page - I am sure they would be interested in it
One down...
With regard to point 3 in the initial post, I have managed to exclude content types from the advanced search form so that they cannot be selected and also to exclude specific content types from the search results page, both being done at the theme level and including the no results text. Possibly not efficient or ideal, but it is at least working... so far....
Still need points 1 and 2 to be addressed. Wondering if having the profile as a node by way of using nodeprofile or usernode (seem to remember one is being abandoned in favour of the other) would be the solution, but still wonder if this would change the fact that the CCK fields do not seem to be indexed or searchable....
nodeprofile and limiting duplicate search results
I have a related problem to this searching issue. I'm using nodeprofile to create an alumni database. Since nodeprofile requires two nodes, a usernode and a node for the persons actual profile, if I search on a users name, they show up twice in the search results (due to nodefamily relationships). So what I need to do is make it so that it doesn't show one of the two nodes. I considered doing this by overriding the search results and just removing the offending node, but this will screw up the paging. Anybody know how to get around this?
Aaron
I am going to be facing a
I am going to be facing a similar problem - I think that the approach i will probably be taking is similar to the one mentioned earlier - present the user with a basic search form but then use hidden fields to fields to filter the search results to exclude a content type. This will maintain consistent paging and be relatively efficient. The functionality is already built into the advanced search form so it will really just be accessing it in a slightly different way.
The bigger issue I have is that some nodes are being used purely to populate lists of content - I don't want these nodes to show up as individual page views, rather I would like the list view to be searched and referenced.
oh well.
Is this module what you're
Is this module what you're looking for?
http://drupal.org/project/search_block
looks like it could be
looks like it could be exactly what i need!
select category option on basic search
The search module is a little inflexible with drupal, i agree!
I would like it to be possible for users to select what category to search in on the basic search. this is possible on the advanced search (although by way of a rather ugly box filled with all the different taxonomy options). i would like a drop down select option to chose taxonomoy category on basic search.
anyone know how to do this?
cheers
Yes Thanks a lot Dude
Hey iub98
Really great find thanQ :)
It met exact requirements for me. Thanks for ur contribution
Thanks
Kamal Challa
Disappointing search function
I would almost like Drupal if not for its search module.
Our korean client has been complaining about the search function. Sometimes it works, sometimes it doesn't. Even with Live Search module on, it sucks.
Google search engine is in fact better than Drupal's search module.
Searching non indexed text
Searching non indexed text on databases is very expensive from the database perspective. Creating a lot of indexes is very expensive on the INSERT, UPDATE and DELETE operations.
Unstructured searches is something that databases were not designed to do, even though they are improving on that ability. They were designed to for structured well indexed data. For databases that are case-sensitive in searches, it is even more expensive. The fact that Drupal has its own search tables helps a lot but it still only offers basic search and not a true search engine.
That is also why you are getting better results from Google, it is a search engine and not a database.
There are modules that link to true search engines like solr and lucene.
The basics are that the data needs to have the stop words removed, tokenized, placed in files with links back to where those references came from. Differences is character handling need to be accounted for. How you want to handle word stemming needs to be accounted for. The actual data to be retrieved by the search results can be stored in a data-base if you want.
Then you get into the world of how should my results algorithm be designed if you want to weight your search results. That is the part that gets really complicated and these algorithms are the secret sauces of commercial search engines. For anything beyond simple algorithms a PhD in math is suggested or you could make it part of your PhD thesis.
A database does not do the above, search engines do. You could probably customize the search so that it will handle searching the database in a manner that you would prefer and improve your results, you would also increase your backend hardware requirements or risk crippling the performance of your website.
A simple example of search is a spellchecker. All the words are placed in a flat file that are easily and quickly searched. There is a reason why spellchecker data isn't placed in the database for searching. For increased performance some sort of hashing algorithm is usually implemented so that the entire word dictionary doesn't have to be searched.
Databases are excellent at structured data search and retrieval. They can handle text searching if needed through the use of the LIKE operator, wildcards and additional relational clauses but for full text searching, there are better options.
Search itself isn't as easy and simple as it seems. If it was, Google wouldn't be worth what it is.
Well said.However lately
Well said.
However lately I've been trying Ruby on Rails and adding a live search functionality on a page is so easy. The great thing about opensource frameworks is that we work less and focus more on our ideas. Some of the things that we need are already out there for free. And there are people who share their works for free which is great.
I may have found a new solution to some of my projects. Completely switching to this solution (Rails) wouldn't work however for all of my projects because of their nature. Drupal is still a great option for most of my projects at the moment.