Searching for multiple keywords

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
MRi
Posts: 61
Joined: Mon Sep 22, 2014 12:52 pm

Searching for multiple keywords

Post by MRi »

Hi!

We are using the phpMyFAQ since 2.0 and we just upgraded to 2.8.3.

We are missing a feature to search for multiple words.
When users enter "word1 word2" they usually exprect that they get the contents of all articels that contain word1 AND word2. But the search of phpMyFAQ shows the result for word1 OR word2.

Is there any setting to get an AND instead of an OR search?

TIA
Martin
Thorsten
Posts: 15814
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Searching for multiple keywords

Post by Thorsten »

HI,

yes: "word1 +word2"

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
MRi
Posts: 61
Joined: Mon Sep 22, 2014 12:52 pm

Re: Searching for multiple keywords

Post by MRi »

Thanks for the fast answer.

I tried this but it doesn't work.

Here is the link to the current http://kb.grutzeck.de

Search for "tapi" returns 17 results
Search for "fehlermeldung" returns 49 results
Search for "tapi +fehlermeldung" returns 64 results

In fact the result should be 2!Anything I can look for?

TIA
Martin
Thorsten
Posts: 15814
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Searching for multiple keywords

Post by Thorsten »

Hi,

which database do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
MRi
Posts: 61
Joined: Mon Sep 22, 2014 12:52 pm

Re: Searching for multiple keywords

Post by MRi »

We are using mySQL
MRi
Posts: 61
Joined: Mon Sep 22, 2014 12:52 pm

Re: Searching for multiple keywords

Post by MRi »

I can see that it works on the demo sites.
It still doesn't work on my kb.grutzeck.de as you can easily try out.

Is there a flag in the config table?
How can I debug it?

I even didn't find the code Location were the AND and OR query is created...

Any Suggestion?
Thorsten
Posts: 15814
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Searching for multiple keywords

Post by Thorsten »

Hi,

you could send me a dump of your database, I could check it more deeply then.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
MRi
Posts: 61
Joined: Mon Sep 22, 2014 12:52 pm

Re: Searching for multiple keywords

Post by MRi »

Is there a chance to change the behavior completely to an AND filter.

So that "word1 word2" always executes a search for "all entries that contain word1 AND word2"

PS: You received an backup with private mail.
Thorsten
Posts: 15814
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Searching for multiple keywords

Post by Thorsten »

Hi,

that should work by "+word1 +word2". By default the search is a OR search: http://dev.mysql.com/doc/refman/5.5/en/ ... olean.html

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
MRi
Posts: 61
Joined: Mon Sep 22, 2014 12:52 pm

Re: Searching for multiple keywords

Post by MRi »

Ah. Now I understand, it is just the text search features directly from the SQL server below...

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

Re: Searching for multiple keywords

Post by Thorsten »

Hi,

yes.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply