I've begun work on a number of enhancements to the trip_search module, including:
- advanced operators
- "" (search for specific phrase)
- OR (find one or another word)
- - (exclude a term)
- filter search by catetory (term)
- filter search by user
- advanced search page
- optional use of regular expression matching (to detect whole words)
- ranking of results based on multiple parameters
The rough draft is in my sandbox. I'm not generating a patch yet because the code isn't nearly ready! That said, if anyone wants to look it over and offer some tips and suggestions, please do.
When these enahncements are complete, some of them may be applicable to the (new, improved) core search module (e.g., filtering by category, advanced operators).
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | trip_search.module | 40.88 KB | code rader |
| #5 | advanced_search_2.PNG | 8.77 KB | nedjo |
| #4 | advanced_search.PNG | 10.5 KB | nedjo |
| #3 | trip_search.tar.gz | 29.62 KB | nedjo |
Comments
Comment #1
moshe weitzman commentedi don't have any test posts at the moment, so i have minor feedack at this point. i hope to give real feedback soon.
- links in search results are busted
- the settings page looks nice. same for help.
- advanced search, don't assume taxonomy.module is active. use module_exist before calling into taxo moddule. also, the 'user' dropdown really has to be textfield, unfortunately. many sites are too big for a dropdown. this is consistent with node admin.
- when printing out node types, use the node name hook, or whatever its called. when you have a list of links (like node types), print it out with theme($links).
- print out search results in a table or in theme('item_list')
at the top of search_parse.module, it looks like you accidentally mangled together the help and block hooks.
eventually, we could really use filtering by date created and maybe date updated.
Comment #2
nedjoThanks for suggestions. I've updated the draft in my sandbox and fixed a number of problems (including some you identified). I've also added filtering by date created, introducing a popup calendar (using existing open source javascript calendar) to specify dates. See readme.txt in my sandbox for brief install instructions.
Notes:
Comment #3
nedjoHere is a beta of the work in progress. It's still a bit rough in places, but is generally functional. Outstanding issues include:
I'd appreciate it if anyone interested could install and test this and report any issues (better yet, post fixes!). I'd like to finish this off but I'm busy for the present with other commitments--so anyone wanting to take on the refining of this would be most welcome!
Comment #4
nedjoScreenshot of top of advanced search page.
Comment #5
nedjoScreenshot of bottom of advanced search page.
Comment #6
onno commentedLooks like a very useful addition to Drupal. If I may suggest something: I think it would be great if there were an opprtunity to restrict your search to a single book instead of the node type book, because you might know the book the answer is in but not where. Same goes ofcourse for the personal blog. And perhaps an extra option so you can kind of make a querie.
This looks very cool!
Comment #7
code rader commentedI am testing and using your cvs version. I squashed a couple of bugs and I will attach the fixed trip_search.module.
Comment #8
code rader commentedEven though I have unchecked to search by user in the settings, it still show up on the advanced page at the bottom with the date.
Comment #9
nedjoThanks for your comments and bug fixes.
Comment #10
nedjoI've upgraded the changes to work with 4.6 and, after discussions with Moshe, applied the patch and branched for 4.6. The code is likely to have some rough edges. Please post issues and fixes!
Comment #11
(not verified) commented