4images Forum & Community

4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: nuzecast on March 22, 2009, 12:36:06 AM

Title: Make Search Ignore Specific Common Words
Post by: nuzecast on March 22, 2009, 12:36:06 AM
Using 1.7.6

Looking for a way to make search ignore words like "the" and similarly common words.

Thanks in advance.

Nuzecast
Title: Re: Make Search Ignore Specific Common Words
Post by: V@no on March 22, 2009, 02:16:41 AM
Hello and welcome to 4images forum.

Common words are listed in lang/<your language>/stop_searchterms.txt file. These words should be ignored by 4images search engine.
Title: Re: Make Search Ignore Specific Common Words
Post by: nuzecast on March 22, 2009, 03:10:45 AM
Thanks for the reply.

Found the stop_searchterms.txt and tried searching for a few of them and they do return results.

examples:  fifty, and, the

Does this have to be enabled somewhere?

Thanks
Nuzecast
Title: Re: Make Search Ignore Specific Common Words
Post by: nuzecast on March 22, 2009, 03:22:45 AM
Found the issue.

In includes/search_utils.php there is an error.

It looks for search_stopterms.txt but the file is stop_searchterms.txt

Thanks
Nuzecast
Title: Re: Make Search Ignore Specific Common Words
Post by: V@no on March 22, 2009, 04:33:33 AM
Oh, thank you for reporting this.

I've added into bug fixes list:
[1.7 - 1.7.6] Search stop terms not being used with english language (http://www.4homepages.de/forum/index.php?topic=24453.0)
Title: Re: Make Search Ignore Specific Common Words
Post by: nuzecast on March 22, 2009, 04:38:45 PM
Hi there, one more search question.

I have an image titled AC/DC but search cannot find it.
I assume you are stripping out the slashes somehow.
Is there a way to allow / to be included in search?

Thanks again for your help.

Nuzecast
Title: Re: Make Search Ignore Specific Common Words
Post by: V@no on March 22, 2009, 09:15:54 PM
Try replace in includes/search_utils.php
Code: [Select]
    "#[\n\t\r^\$\(\)<>\"\|,@\?%~\+\.\[\]{}:\/=!§\\\\]+#s"
with this:
Code: [Select]
    "#[\n\t\r^\$\(\)<>\"\|,@\?%~\+\.\[\]{}:=!§]+#s"
Title: Re: Make Search Ignore Specific Common Words
Post by: nuzecast on March 22, 2009, 11:04:45 PM
Thanks for the reply but still returns no results.

Nuzecast
Title: Re: Make Search Ignore Specific Common Words
Post by: V@no on March 22, 2009, 11:46:37 PM
Oh I didn't realize you had forward slash...
I've updated my post above.

Also keep in mind, this change will not affect already existing keywords.
You might want use [Plugin] Rebuild Search Index (http://www.4homepages.de/forum/index.php?topic=1096.0) for existing keywords.
Title: Re: Make Search Ignore Specific Common Words
Post by: nuzecast on March 23, 2009, 01:57:15 PM
That worked.  Thanks very much!