Fuzzy Search Scoring Hook (SoC Update)

Events happening in the community are now at Drupal community events on www.drupal.org.
BlakeLucchesi's picture

I'm contemplating how to implement a scoring factor hook into my new fuzzy search engine module. I believe what may work out to be the best way of doing this is allowing modules to tap into this scoring hook at the time of indexing.

Each hook should return a value between 0 and 10 as a score to add to the node being indexed. Then in the administration screen an administrator would be able to set the importance of the score given by that hook. This would allow the administrator of a drupal site to manage the scoring from different contributed modules.

In addition to this, it would also be necessary to provide a simple function, to allow modules to notify the site that a node is due for re-indexing. Something along the lines of:

fuzzysearch_reindex($nid, $module);

Combining this and a hook to nodeapi so that whenever a node is updated its called for re-indexing also. Ultimately tracking nodes indexing through a process besides looking at the last time cron as run and comparing that to the last update time of the node will allow for more frequent, and often but not always, needed reindexing and scoring of content.

A further update on the project status: I have made progress on the indexing, I am now able to index the content and apply completeness factors to the trigrams (allowing the engine to find out how many of the pieces of the word it found) as well as tag indexing and scoring thanks to the current search.module. I've also been able to complete a working front end to the search engine that returns results with scores so that testing of the result relevancy can be done allowing test users to begin giving feedback on the score factors and effectiveness of the new search engine.

Try out fuzzy search

As always, all comments encouraged.

Blake Lucchesi
blake@boldsource.com
www.boldsource.com

SoC 2007

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: