Search phrase (with quotation marks) not working

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
danny-2
Posts: 14
Joined: Fri Oct 25, 2013 10:29 am

Search phrase (with quotation marks) not working

Post by danny-2 » Thu Mar 23, 2017 3:24 pm

Hi,

phpMyFAQ seems to be having problems with search phrases (in between quotation marks). For example I want to search for the exact phrase "another computer problem". I don't expect hits for FAQ's containing just one or more of these words. I expect only hits with the exact phrase. At least that's how it should work according to https://dev.mysql.com/doc/refman/5.5/en ... olean.html.

I just used this demo page: http://jen.demo.phpmyfaq.de/ (2.9.6 with PHP 5)
After adding 2 similar FAQ's I did a search. Instead of only 1 hit there were 2 hits.

FAQ1 had this text:
Another apple banana juice in this simple test. Just quit smoking today.

FAQ2 had this text:
Another banana apple juice in this simple test. Just gave up smoking today.

My search term (including the double quotes): "banana apple"

Search result:
1. FAQ 1
2. FAQ 2 (which should have been the only result - because only this FAQ does contain the search phrase)
phpmyfaq-search-phrase.png
Is this a bug in MySQL or phpMyFAQ or am I missing something?

Danny
You do not have the required permissions to view the files attached to this post.

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

Re: Search phrase (with quotation marks) not working

Post by Thorsten » Thu Mar 23, 2017 5:15 pm

Hi,

how many FAQs do you have in your installation?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

danny-2
Posts: 14
Joined: Fri Oct 25, 2013 10:29 am

Re: Search phrase (with quotation marks) not working

Post by danny-2 » Fri Mar 24, 2017 10:35 am

Hi Thorsten,

in my installation there are about 900 FAQ's. On the demo server there were 4 or 5 while I tested yesterday.

Danny

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

Re: Search phrase (with quotation marks) not working

Post by Thorsten » Fri Mar 24, 2017 6:53 pm

Hi,

okay, 900 FAQs are enough. Is it possible to get a copy of them to analyze what's happening?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

danny-2
Posts: 14
Joined: Fri Oct 25, 2013 10:29 am

Re: Search phrase (with quotation marks) not working

Post by danny-2 » Mon Mar 27, 2017 2:03 pm

Hi Thorsten,

I can't give away the original Database. But I set up another FAQ on the same server which is showing the same problem. I did a clean install (new database, new phpMyFAQ 2.9.6 installation) and added 40 FAQs.

When I search for a phrase the result is similar to a search without quotation marks. For example the search phrase "beschränkungen dürfen" finds me 7 hits in phpMyFAQ. When I search for the same phrase via MySQL it finds me 2 hits (which is correct):
phpmyfaq-vs-mysql-search.png
I attached a backup of the FAQs here:
2017-03-27-14-37-57_phpmyfaq.zip
You do not have the required permissions to view the files attached to this post.

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

Re: Search phrase (with quotation marks) not working

Post by Thorsten » Mon Mar 27, 2017 2:36 pm

Hi,

do you have the SQL backup for me as it's hard to import the JSON ;)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

danny-2
Posts: 14
Joined: Fri Oct 25, 2013 10:29 am

Re: Search phrase (with quotation marks) not working

Post by danny-2 » Mon Mar 27, 2017 3:43 pm

Oh, sorry. That was the wrong menu I used...

Here's the correct export:
phpmyfaq-data.2017-03-27-16-34-40.sql.zip
You do not have the required permissions to view the files attached to this post.

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

Re: Search phrase (with quotation marks) not working

Post by Thorsten » Mon Mar 27, 2017 3:57 pm

Hi,

first finding: the search query returns on the MySQL command line two results, in PHP seven results. This is strange. I'll have to investigate this.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

danny-2
Posts: 14
Joined: Fri Oct 25, 2013 10:29 am

Re: Search phrase (with quotation marks) not working

Post by danny-2 » Wed Apr 19, 2017 2:52 pm

Hi Thorsten,

could you find the problem in the meantime?

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

Re: Search phrase (with quotation marks) not working

Post by Thorsten » Thu Apr 20, 2017 8:12 am

Hi,

not yet!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest