How can I change the advanced search logic ?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
zazaza
Posts: 12
Joined: Tue May 09, 2006 10:55 am

How can I change the advanced search logic ?

Post by zazaza »

Suppose one insert 3 words in the advanced search, I think it will be better that the search will run with "AND" between the words and not with "OR",
Is it possible to change it?, if yes which file should I change for that.

Thanks in advanced,
Alberto.
zazaza
Posts: 12
Joined: Tue May 09, 2006 10:55 am

Post by zazaza »

BTW: I am using version 1.6.0
Thanks,
Alberto.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you can use a "+" to use AND instead of OR.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
zazaza
Posts: 12
Joined: Tue May 09, 2006 10:55 am

Post by zazaza »

Thanks,

Which file, line number should I chang?
Thanks,
Alberto.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

you do not need to change a file because our search is based on the MySQL fulltext search. Just search like that:
word1 + word2 + word3
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
zazaza
Posts: 12
Joined: Tue May 09, 2006 10:55 am

Post by zazaza »

I tried, it didn't work.
I still get to many results what I don't want.
What I want is that a user will get in "advanced search" a results just if all the words found in a record.
Thanks,
Alberto.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

which MySQL version do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
zazaza
Posts: 12
Joined: Tue May 09, 2006 10:55 am

Post by zazaza »

4.1.10
Thanks,
Alberto.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

it should work there.... can you post the URL of your FAQ here?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
zazaza
Posts: 12
Joined: Tue May 09, 2006 10:55 am

Post by zazaza »

Actually I can't do it right now.
:(

Any other idea ?
Thanks,
Alberto.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

hm, I'll test it on my local box here, but I have to install MySQL 4.1 first.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
zazaza
Posts: 12
Joined: Tue May 09, 2006 10:55 am

Post by zazaza »

Appreciating that.
Thanks,
Alberto.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

I told you the wrong syntax, sorry! Here's the correct search syntax: http://dev.mysql.com/doc/refman/4.1/en/ ... olean.html

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
zazaza
Posts: 12
Joined: Tue May 09, 2006 10:55 am

Post by zazaza »

This is working.

Thank you.

Alberto.
Post Reply