Posted by Grondhammar on August 11, 2010 at 3:05pm
This appears to be an oft-asked and poorly-answered question on the main forums, so I thought I'd ask here.
For the first time, I need to build a search form for a CCK node. The node is relatively tiny (abt 15 fields) and I don't need anything fancy -- just the ability to search any field, and get a simple list of results.
Faceted Search/Solr are out of the question due to hosting & admin rights issues -- and it'd be overkill for what I need.
Any suggestions would be a big help, thanks!
Comments
You can do a lot with views exposed filters
If you want to be able to look things up by a specific field, Views exposed filters work well, especially if there's not a huge amount of content such that caching and performance will be a concern.
For example, the Faculty & Staff directory I've recently developed for our dept. (not yet live) is a view with exposed filters for clinic (a taxonomy term in a content tanxonomy fields), first name field starts with, and last name starts with (both simple text fields). It works very nicely. You can even enable the view to update with AJAX, so users don't have to wait for a page load (though this might not be wise if the content type you're searching has more than a couple thousand nodes).
re: exposed filters
No, this is a pretty small set of information -- hundreds of rows at most -- so that sounds perfect. Thanks much! I'll check it out.
Search like a poor man
Sounds like you might be able to use the "Poor man's faceted search."
http://drupal.org/node/682014
Basically the same thing xjm suggested, but hides them inside a fieldset.
re: fieldset
Ahh, very nice - I like examples =) Collapsible filters would be perfect, hopefully I can get it going. Thanks a lot!