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.







thanks nice text
thanks nice text
this is a good post.
this is a good post.
nice post..
nice post..
Post new comment