Post by Qphoria » Sat Feb 11, 2012 5:08 am

Renato Frota wrote:I'm surprised with this...

comparing the file attached by Qphoria with the default OC 1.5.1.3 file, I found this twice in default file (lines 80-82 and 444-446):

Code: Select all

					foreach ($words as $word) {
						$implode[] = "LCASE(pt.tag) LIKE '%" . $this->db->escape(utf8_strtolower($data['filter_tag'])) . "%' AND pt.language_id = '" . (int)$this->config->get('config_language_id') . "'";
					}
what is $data['filter_tag'] is doing there? where's $word extracted by foreach()?

in the Qphoria version, I found:

Code: Select all

				foreach ($words as $word) {
					$implode[] = "LCASE(pt.tag) LIKE '%" . $this->db->escape(utf8_strtolower($word)) . "%' AND pt.language_id = '" . (int)$this->config->get('config_language_id') . "'";
				}
which makes a lot more sense with the $word in the middle of it!

Did I miss a previous fix of this file?!
no, as I said there was a bug I fixed in my research, that was the bug fix.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Sat Feb 11, 2012 5:09 am

marcelwoo wrote:I have tried the fix on my store but it does not seem to work, lots lots of irrelevant items are still shown.
I have also tried searching"Migs Payment Integration" on your store and obviously the fix does not work.
Link here:
http://opencartguru.com/index.php?route ... ntegration

Gosh, searching really needs improvement!

PS: I just made a vQmod for this fix. You guys can give it a shot and offer feedbacks on this fix:) Report back here whether it works or not!
search_improve.xml
You are right.. something still not right when searching more than 2 words. I don't have "payment" set on the tag so that is why is doesn't show. The code currently does AND for each search term, but really needs to combine separately because it is doing:
"Migs" AND "payment" AND "integration"

The mod was renamed to "Migs Gateway Integration"
So the word "payment" isn't found anymore. and since I don't have the tag "payment" it just doesn't find it.

So a way to try all combinations of keywords is needed.
Migs
Migs AND payment
Migs AND integration
Payment AND integration

but then it starts getting a bit unruly
So my fix only works right if you have tags complimenting the other words. Overall it dropped it from 4 pages of results to 2 pages, but if I had all my tags right.. it would still find a ton.

A proper fulltext search is what is needed to put it to rest.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by marcelwoo » Sat Feb 11, 2012 11:48 am

Will Daniel or others in the official development team handle this searching problem in the near future? I think maybe you guys can have a look at how other carts works on searching algorithm. Not need to be same with other cart systems but borrowing good ideas is not a bad idea;)

"We help each other to grow". That's the opencart community!

All free mods
Home Based Ebay business Opportunity(not ads)


User avatar
Active Member

Posts

Joined
Tue Mar 29, 2011 1:45 am

Post by Qphoria » Sat Feb 11, 2012 11:56 am

I am the other half of the developing team and i am working on this issue. As i said this mod was first stab but fulltext is the proper way. Search "mysql Fulltext" for more info

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by marcelwoo » Sat Feb 11, 2012 11:13 pm

awesome! hopefully it is not too long before this bug is fixed.

"We help each other to grow". That's the opencart community!

All free mods
Home Based Ebay business Opportunity(not ads)


User avatar
Active Member

Posts

Joined
Tue Mar 29, 2011 1:45 am

Post by myerswb » Fri Mar 02, 2012 3:21 am

Do we have an update on this fix yet?

Newbie

Posts

Joined
Sat Jun 25, 2011 3:10 pm

Post by Qphoria » Fri Mar 02, 2012 3:34 am

I can tell you it won't be in 1.5.2
It is top priority for 1.5.3 and hopefully can be patched in to 1.5.2 when its ready, but won't be holding up the release of 1.5.2

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by DragonJ » Fri Mar 02, 2012 3:41 am

Just to post a quick follow-up on this, I've found another issue (sorry if it's already been brought to attention).

First off, I will confirm that 3-word searches return erratic results.

What I've also found is that when including a 2-letter word in the search, the results are also erratic and incomplete. Something like "07 Toyota Fuse" will return irrelevant results in addition to lots of "non-existant $0.00" results.

If the developers are interested, send me a PM and I'll provide a link to an example.

My store is awesomely powered by OpenCart 1.5.5.1.


User avatar
Active Member

Posts

Joined
Sun Jan 29, 2012 4:49 pm

Post by Qphoria » Fri Mar 02, 2012 3:49 am

It's probably best to require 3 or more letters for search

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by DragonJ » Fri Mar 02, 2012 4:30 am

Unfortunately, a lot of my products involve 2-letter words -- not by my choice. These are what the manufacturers have named these parts and therefore those are the words that people use when searching for them. :(

My store is awesomely powered by OpenCart 1.5.5.1.


User avatar
Active Member

Posts

Joined
Sun Jan 29, 2012 4:49 pm

Post by myerswb » Wed Apr 04, 2012 2:26 am

Any news on this or do I have to 'buy' another extension which may not work?

Newbie

Posts

Joined
Sat Jun 25, 2011 3:10 pm

Post by pgp » Thu May 03, 2012 5:14 am

Thank you for posting this fix. My results were returning items which weren't related but now has gone down to handful of related items. However 1 little issue.

My shop has printer cartridges, so lets say someone is searching for "HP 1200" this could be in product name or product description. Right now my search look only in product name and not in description so unless I tick look in product description it doesn't show any results. Any idea how I can fix this?

Thanks.

pgp
New member

Posts

Joined
Mon Jan 30, 2012 1:08 pm

Post by DragonJ » Thu May 03, 2012 7:19 am

Does the same problem happen if you search only for "1200"?

My store is awesomely powered by OpenCart 1.5.5.1.


User avatar
Active Member

Posts

Joined
Sun Jan 29, 2012 4:49 pm

Post by pgp » Thu May 03, 2012 4:17 pm

Hi Dragonj,

Yes same happens if i search for 1200. I think it because I don't have a product name calles HP 1200 or 1200. But have HP 1200 in product description. However if i tick search product description then it returns results with HP and also 1200, so could be another printer which has Ricoh 1200 for an example.

Any idea how this could be improved?

Thanks.

pgp
New member

Posts

Joined
Mon Jan 30, 2012 1:08 pm

Post by storm-cloud » Fri May 04, 2012 12:39 am

Qphoria wrote:I've attached the default 1.5.1.3 catalog model file with all changes
Drop it into catalog/model/catalog folder and replace the existing product.php file
Thank you Q!

I have actually posted this in the bug thread not too long ago because for some reason when I searched for this issue previously, this thread did not show up (kind of ironic!).

Anyway, your changes are a definite improvement. A couple searches revealed products in a not so relative order but on the whole there is a substantial improvement with far less irrelevant results.

Active Member

Posts

Joined
Wed Feb 22, 2012 8:07 am

Post by pgp » Fri May 04, 2012 5:28 pm

Any one here can help me? :( kinda stuck without a solution.

pgp
New member

Posts

Joined
Mon Jan 30, 2012 1:08 pm

User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by pgp » Sat May 05, 2012 7:18 am

Thank you, no other free solution i guess? :(

pgp
New member

Posts

Joined
Mon Jan 30, 2012 1:08 pm

Post by pgp » Sun May 06, 2012 3:57 pm

Just wondering if below is possible to do?

Currently my search is returning correct search results based on product names with modified settings mentioned in this thread. Is it possible to extend that to look under product description the same way?

pgp
New member

Posts

Joined
Mon Jan 30, 2012 1:08 pm

Post by SDSkisDan » Wed Jun 13, 2012 10:09 pm

I hope I'm not breaking any rules by necro'ing this thread, but after the release of 1.5.3.1 it doesn't appear these fixes have gotten into the code. I manually updated the code as described and my search is still returning some crazy irrelevant results. Has improving the base Opencart search become a commercial endeavor only? I've tried a single keyword, two keywords, and three keywords in search and I basically will get my entire catalog in search results unless I enter in a distinct model or sku number. Is there anything else I can try?

New member

Posts

Joined
Fri Nov 25, 2011 3:59 am
Who is online

Users browsing this forum: Amazon [Bot] and 14 guests