Page 1 of 1

Seach Results Sorted by Relevance

Posted: Fri Jan 29, 2010 4:01 am
by gardnerr
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

Re: Seach Results Sorted by Relevance

Posted: Fri Jan 29, 2010 10:35 am
by Mike718NY
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.

Re: Seach Results Sorted by Relevance

Posted: Fri Jan 29, 2010 11:51 am
by mazhar
Issue logged you can track progress here
http://bugs.ablecommerce.com/show_bug.cgi?id=8715

Re: Seach Results Sorted by Relevance

Posted: Fri Jan 29, 2010 6:07 pm
by gardnerr
Thank Mazhar. This is an essential feature - I'm just surprised it hasn't been raised sooner.

Regards

Rob

Re: Seach Results Sorted by Relevance

Posted: Tue Feb 16, 2010 11:47 am
by Mike718NY
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.

Re: Seach Results Sorted by Relevance

Posted: Thu Feb 18, 2010 10:32 am
by Mike718NY
--

Re: Seach Results Sorted by Relevance

Posted: Thu Feb 18, 2010 11:10 am
by Mike718NY
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.

Re: Seach Results Sorted by Relevance

Posted: Sat Feb 20, 2010 11:40 am
by Katie
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

Re: Seach Results Sorted by Relevance

Posted: Tue Mar 09, 2010 12:16 pm
by Mike718NY
--

Re: Seach Results Sorted by Relevance

Posted: Tue Mar 09, 2010 2:07 pm
by gardnerr
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

Re: Seach Results Sorted by Relevance

Posted: Tue Mar 09, 2010 2:25 pm
by Mike718NY
--

Re: Seach Results Sorted by Relevance

Posted: Tue Mar 09, 2010 2:40 pm
by Mike718NY
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.

Re: Seach Results Sorted by Relevance

Posted: Tue Mar 09, 2010 2:59 pm
by gardnerr
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

Re: Seach Results Sorted by Relevance

Posted: Tue Mar 09, 2010 3:28 pm
by Mike718NY
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.

Re: Seach Results Sorted by Relevance

Posted: Sat May 01, 2010 6:57 pm
by GrfxDan
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.

Re: Seach Results Sorted by Relevance

Posted: Thu May 27, 2010 10:49 am
by dc8johnson
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

Re: Seach Results Sorted by Relevance

Posted: Thu May 27, 2010 10:56 am
by GrfxDan
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?