Welcome! Log In Create A New Profile

Advanced

Apostrophe and Single Quotes Not searchable

Posted by MyBlueSky 
Apostrophe and Single Quotes Not searchable
July 23, 2010 11:59PM
words and phrases with apostrophe or single quotes are not searchable. Word stemming is enabled. Any suggestion to fix this? Is there a code to stip the quote or apostrophe to enable search?
Re: Apostrophe and Single Quotes Not searchable
September 19, 2010 12:11PM
yes , big^problem for site with french content

[url=http://www.pourlogiciel.com/]logiciels[/url]
Re: Apostrophe and Single Quotes Not searchable
October 01, 2010 02:46PM
Heya,

I am in the process of testing Sphider for my site, and think I have found a solution to your problem.

It is not the best solution smiling smiley but it should solve your problem:

In the file ./admin/spiderfuncs.php make the following change to the function get_head_data (should be line 523):
function get_head_data($file) {
    $headdata = "";
    // Added by me - 01-10-10
    $file = str_replace("'", " ", $file);
           
    preg_match("@<head[^>]*>(.*?)<\/head>@si",$file, $regs);	
	
    $headdata = $regs[1];

This will replace all "'" characters with a white space. As I say this is not the best work around. However it may inspire someone to say "that's a rubbish idea, here is how you should have done it..." smiling smiley
Sorry, only registered users may post in this forum.

Click here to login