Page 1 of 1

Fulltext Search?

Posted: Thu May 21, 2015 10:40 am
by sweeperq
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 :(

Re: Fulltext Search?

Posted: Fri May 22, 2015 1:31 am
by jmestep
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.

Re: Fulltext Search?

Posted: Tue May 26, 2015 5:19 am
by sweeperq
Thanks Judy, I'll look into it.

Re: Fulltext Search?

Posted: Tue May 26, 2015 11:00 am
by sweeperq
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 :)