[wp-hackers] Overriding get_posts() behaviour

ml_wordpress at copperleaf.org ml_wordpress at copperleaf.org
Sun Jul 3 12:48:16 GMT 2005

I've also taken a look at Denis' plugin and have a few ideas that maybe 
you guys could add. I've modified Denis' plugin on my testbed just for 
fun and could send you the code if you wish. Here is a list of ideas:

1) Probably the most useful function for me was that I added a filter to 
the sem_search_index function that allows additional plugins to add 
additional words to the node_content column. This could actually be a 
foundation filter for the plugin in that all search words could be added 
that way: the_content, the_title, post_tags, and, in my case, data from 
columns in new tables.

2) I found that by using a fulltext search, is you search on 'bean', it 
won't match 'beans'. I don't know if there is a something in the 
fulltext search that can allow you to do 'like' queries. If not, maybe 
that could be either a global option or something selected from an 
advanced search page that would allow you to do fulltext searches or 
like searches. (BTW Denis, some hosts default to Innodb tables so in 
your create table statement you need to specify ENGINE=myisam so that 
fulltext indexes can be created.)

3) I added some code that would clean out all funky characters, remove 
all duplicates and collapse all whitespace in the node_content column. 
This can shorten the size of the field significantly and removing the 
dups is nice if you aren't doing weighted searches. Something else to 
consider would be to remove all stopwords. (Configurable from an admin 

4) One last idea is that perhaps an option could be so store the soundex 
(or some other algorithm) for the word list so that searches are done on 
that instead of the actual word.

Anyway, like I said above, I'd be glad to send you guys my mods or I'd 
be glad to help with parts of this if you wish.


More information about the wp-hackers mailing list