Looks like that plugin does pretty much the same thing Relevanssi is doing, or at least on a quick look I can’t see much difference. Relevanssi already creates an inverted index of the database content.
Thread Starter
radeko
(@radeko)
Thank you Mikko for your prompt reply. Does the plugin strips also the HTML tags? I’m asking because searching for the words in italics does not work on my site.
Thank you.
Radoslaw
Yes, Relevanssi strips HTML, tokenizes, strips punctuation and creates an index with the words, and nothing else. Searching for words in italics is not a problem at all.
If it’s not working, then the problem is something else. Is the search powered by Relevanssi in the first place?
Thread Starter
radeko
(@radeko)
Yes I’m using Your plugin.
For example if I search for
http://www.amruta.org/?s=%22create+the+spandana%22
then I should get
http://www.amruta.org/1979/10/08/maintaining-purity-of-sahaja-yoga-1979/
but i’m getting “Nothing Found”
Another thing is that this part of the code in /lib/interface.php
$words = $wpdb->get_results(“SELECT COUNT(DISTINCT(doc)) as cnt, term FROM ” . $relevanssi_variables[‘relevanssi_table’] . ” GROUP BY term ORDER BY cnt DESC LIMIT 25″);
was killing my quite fast mysql server, probably because i’m having
Documents in the index: 5567
Terms in the index: 3625922
🙂
It would be great to have an option “do not show top 25 words”
thank you
Radoslaw
Ah, yes. The problem is not the italics per se, but the phrase search. Phrase search compares directly to the MySQL database, and there the italics are a problem. Remove the quotes, and the search finds the results: http://www.amruta.org/?s=create+the+spandana
There’s unfortunately no easy solutions to this, as the phrase search must use the original post content and there’s no easy way to skip the tags in MySQL queries. Reading in the post content, stripping the tags and comparing then is too slow. Building a fulltext index without the tags would take too much time and space.
There is an option to stop the top 25 words:
add_filter('relevanssi_display_common_words', 'rlv_stop_25');
function rlv_stop_25($stop) {
return false;
}