Fulltext Search?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
sweeperq
Commodore (COMO)
Commodore (COMO)
Posts: 497
Joined: Tue Jan 03, 2006 2:45 pm

Fulltext Search?

Post by sweeperq » Thu May 21, 2015 10:40 am

I'm curious where and how FULLTEXT Search is used in AC7? In looking at the source for CatalogDataSource and SearchDataSource, everything appears to be using a standard SQL LIKE operator.

The reason I am interested is because I need to perform a FULLTEXT search on the webpages table within the Name, Title, and Description columns. When I attempt to do so, I get the following error:
Cannot use a CONTAINS or FREETEXT predicate on table or indexed view 'ac_Webpages' because it is not full-text indexed.
I could use the CatalogDataSource.Search method, but it doesn't load all of the columns I need, with means I'd need to run another query for every result to get the details :(

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Fulltext Search?

Post by jmestep » Fri May 22, 2015 1:31 am

When I customized a site for that, I had to add webpages to the full text search catalog in the database. You can do that directly in the database or via code. If you do it directly, be aware that if someone changes the search settings in the admin to non-full text search, it will remove the full text search catalog.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

sweeperq
Commodore (COMO)
Commodore (COMO)
Posts: 497
Joined: Tue Jan 03, 2006 2:45 pm

Re: Fulltext Search?

Post by sweeperq » Tue May 26, 2015 5:19 am

Thanks Judy, I'll look into it.

sweeperq
Commodore (COMO)
Commodore (COMO)
Posts: 497
Joined: Tue Jan 03, 2006 2:45 pm

Re: Fulltext Search?

Post by sweeperq » Tue May 26, 2015 11:00 am

Thanks Judy. Added FULLTEXT search with the following Transact-SQL:

Code: Select all

CREATE FULLTEXT INDEX ON ac_Webpages (Name, Summary, [Description]) KEY INDEX ac_Webpages_PK ON ac_SearchCatalog;
Things are working now :)

Post Reply