Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
The next steps in search functionality Developer Diary
By hillct , Section Dev Notes []
Posted on Fri Dec 07, 2001 at 05:46:21 AM PST
Now that FULLTEXT searches are working reasonably, the next set of features I plan to add in a substancial rewrite of the search code (when I have time) are:
  • Stop slinging DB Statement Handles. Sling data between functions instead (code cleanup)
  • 'Entire Site' search to integrate results from comments and stories
  • Search Admin Notes if you have the perm edit_user and allow_admin_notes is turned on
  • Blocks support for display of search results to allow greater flexibility

With regard to reducing the slinging of DB Statement Handles, this is mostly an internal code cleanup but there will be one user side feature resulting from the cleanup. The call to $S->search() will take an argument (NOFORMAT => 1 or something) which will cause the results to be returned as an an array of hash refs to be formatted in a seperate method. Internally, there will be a new method $s->search_format() which will take the search results as an array ref as well as the name of the search_* block (explained below) with which to format the results. In the case of NOFORMAT => 1, this method will simply not be called, and the result of fetchall_arrayref({}) will be returned from $S->search() instead.

As to block support for display of search results, it seems to me that there should be a set of blocks including search_entire, search_comments_by, search_stories, etc. where each search type will have a defauilt results display block which can be overridden in the call to $s->search(). Each of these blocks will contain variable substitutions for each of the fields of a single search result. Substitution against the block will be repeated for each search result until there are no further results. The usual search form and links will be added and the result will be output as 'CONTENT'. This is not strictly the intuitive behavior of blocks (although it is quite functional). If anyone can come up with a more intuitive and equally functional behavior, please let me know.
< Replacing MySQL backend with DB2 or Oracle | First cut DB2 database >

Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Login
Make a new account
Username:
Password:

Related Links
· hillct's Diary

Story Views
  10 Scoop users have viewed this story.

Display: Sort:
The next steps in search functionality | 0 comments ( topical, 0 hidden)
Display: Sort:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search