Seach Results Sorted by Relevance

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
gardnerr
Ensign (ENS)
Ensign (ENS)
Posts: 20
Joined: Sun Oct 04, 2009 3:57 pm

Seach Results Sorted by Relevance

Post by gardnerr » Fri Jan 29, 2010 4:01 am

Hi,

I wish to have a site search option that sorts results by relevance. At the moment, if I search for a product named Dart 200, for example, I get back the full text search results sorted by name, and the Dart 200 is half way down the page.

I know how to implement a custom sort, but I would then be forced to compare the search term against each product myself, and implement what is essentially the same functionality as that already contained within full text search.

When using the CONTAINSTABLE function for full text search, a rank value is returned that would allow the results to be sorted by relevance. Is there any reason why this is not returned in some way when performing a full text search?

Thank you

Rob Gardner

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: Seach Results Sorted by Relevance

Post by Mike718NY » Fri Jan 29, 2010 10:35 am

I'm seeing the same problem.
I have a website now that I'm converting to AC7.
When I search "Baptismal Stationary" for example, it brings those
2 items right to the top of page one in the search results.
The same search in AC7 displays them on the page 6.

It took me months before I was able to figure out how to get full text search to do that.
I would like to change the SQL and experiment with my code but I can't
because I dont' have the source code.
Last edited by Mike718NY on Fri Mar 05, 2010 5:15 pm, edited 1 time in total.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Seach Results Sorted by Relevance

Post by mazhar » Fri Jan 29, 2010 11:51 am

Issue logged you can track progress here
http://bugs.ablecommerce.com/show_bug.cgi?id=8715

gardnerr
Ensign (ENS)
Ensign (ENS)
Posts: 20
Joined: Sun Oct 04, 2009 3:57 pm

Re: Seach Results Sorted by Relevance

Post by gardnerr » Fri Jan 29, 2010 6:07 pm

Thank Mazhar. This is an essential feature - I'm just surprised it hasn't been raised sooner.

Regards

Rob

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: Seach Results Sorted by Relevance

Post by Mike718NY » Tue Feb 16, 2010 11:47 am

Can anyone give me an update on the progress of this?
The search does not give the results it should if 2 or more
search words are entered.
And when the customer can't find exactly what they are looking for,
they will leave the website. This is happening a lot from looking at the logs.

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: Seach Results Sorted by Relevance

Post by Mike718NY » Thu Feb 18, 2010 10:32 am

--
Last edited by Mike718NY on Tue Mar 16, 2010 7:25 pm, edited 1 time in total.

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: Seach Results Sorted by Relevance

Post by Mike718NY » Thu Feb 18, 2010 11:10 am

Here is one of many examples of customers leaving the site because they
can't find what they want.
Below, the customer searched for "chalice pins", going through 21 pages.
They left the site because they gave up looking. Can't blame them.
There are 2 products for "chalice pins" and the SQL form the last post
brings them to the first 2 items on the first page.
Last edited by Mike718NY on Sun Feb 21, 2010 10:50 am, edited 1 time in total.

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Seach Results Sorted by Relevance

Post by Katie » Sat Feb 20, 2010 11:40 am

Hello,

I've updated the severity of the bug report with this new information.

Thanks for letting us know, we'll be getting a patch out soon.

Katie
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: Seach Results Sorted by Relevance

Post by Mike718NY » Tue Mar 09, 2010 12:16 pm

--
Last edited by Mike718NY on Tue Mar 16, 2010 11:43 am, edited 1 time in total.

gardnerr
Ensign (ENS)
Ensign (ENS)
Posts: 20
Joined: Sun Oct 04, 2009 3:57 pm

Re: Seach Results Sorted by Relevance

Post by gardnerr » Tue Mar 09, 2010 2:07 pm

I've put a temporary fix in my own site for this. No point in posting the code though if it will be fixed soon.

Able, any idea on time-scales?

Regards

Rob

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: Seach Results Sorted by Relevance

Post by Mike718NY » Tue Mar 09, 2010 2:25 pm

--
Last edited by Mike718NY on Tue Mar 16, 2010 7:25 pm, edited 1 time in total.

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: Seach Results Sorted by Relevance

Post by Mike718NY » Tue Mar 09, 2010 2:40 pm

I turned off Full Text Search to see if the other search is any better.
Not really. Inconsistent results.
If I search "Boat Plaque" I get all 4 items.
If I search "Boat Plaques" I get no results.

A properly configured Full Text Search would return 4 items in both cases, . .
as it just did when I tried it on my old website that has the exact same
database and uses Full Text Search.

gardnerr
Ensign (ENS)
Ensign (ENS)
Posts: 20
Joined: Sun Oct 04, 2009 3:57 pm

Re: Seach Results Sorted by Relevance

Post by gardnerr » Tue Mar 09, 2010 2:59 pm

Hi Mike,

This is due to whether the search engine uses stemming. Full Text Search does use this, so it should return results in both cases.

I have attached the files that are needed for the fix. The conlib and scriptlet files will obviously need merging if you've already customised any of these. I have zipped them in the folders that they belong.

I obviously can't provide any guarantees with this, and if anyone from AbleCommerce can spot any issues then please let me know. There would have to be a major flaw though for there not be an improvement over the A-Z search option in terms of findability for users.

I think I have remembered every file that is needed, so let me know how you go on.

Cheers

Rob

Mike718NY
Commodore (COMO)
Commodore (COMO)
Posts: 485
Joined: Wed Jun 18, 2008 5:24 pm

Re: Seach Results Sorted by Relevance

Post by Mike718NY » Tue Mar 09, 2010 3:28 pm

Thanks Rob, I'll try it out.
I wish I could just use my SQL (from an above post) but I don't have the full source code.
That SQL works perfectly for every search.

User avatar
GrfxDan
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 82
Joined: Sat May 26, 2007 10:58 am
Location: Mt Zion, IL
Contact:

Re: Seach Results Sorted by Relevance

Post by GrfxDan » Sat May 01, 2010 6:57 pm

Bump - any update on this? Another related thread on search issues: Search is acting strange after updating to 12912 DLL

Search needs fixed! I have MANY customers that visit and leave because they can't find what they're looking for. I don't know what the status of fixing the search problems is but I hope it's a high priority. Please update us. Thanks.
Image

dc8johnson
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 87
Joined: Fri Nov 20, 2009 8:46 am

Re: Seach Results Sorted by Relevance

Post by dc8johnson » Thu May 27, 2010 10:49 am

Any progress on this by Able Commerce? According to the Bug 8715 listing:
------- Comment #11 From Logan Rhodehamel 2010-03-19 16:51:32 -------
This was merged to 7.4 stable at r13606.
------- Comment #12 From Logan Rhodehamel 2010-03-19 16:52:57 -------
This is work completed for the 7.0.5 release. The update was also made
available to 7.0.4 through a patch.
I don't see any available release or patch for 13606 or that mentions the search results.

Anyone else made any progress? The SearchFix code provided by gardnerr was a lot of help. It at least got my desired products up to the top. But it still had way too many products in the results. I made some changes to the ProductSearch.cs that performed an AND search when multiple words were entered but then the search sidebar was out of sync and caused all sorts of confusion. For this change I replace all " " in the search term with " AND " and then changed the SQL from

Code: Select all

INNER JOIN      FREETEXTTABLE (ac_products, *, '""{1}""') FT on P.ProductId = FT.[key]
to

Code: Select all

INNER JOIN      CONTAINSTABLE (ac_products, *, '{1}') FT on P.ProductId = FT.[key]
Any updates from anyone?

Thanks
David Johnson

User avatar
GrfxDan
Lieutenant Commander (LCDR)
Lieutenant Commander (LCDR)
Posts: 82
Joined: Sat May 26, 2007 10:58 am
Location: Mt Zion, IL
Contact:

Re: Seach Results Sorted by Relevance

Post by GrfxDan » Thu May 27, 2010 10:56 am

Recent progress on the search issue has been made, according to this bug report, however, to my knowledge a new patch has not yet been released. I'm hoping that'll happen very soon. Perhaps someone from AbleCommerce can update us?
Image

Post Reply