Knowledge Base

Updating the GetQuery Method in CMS 9.0 InSite Search

Updating the GetQuery Method in CMS 9.0 InSite Search


Description

As of Ingeniux CMS 9.0.319, the GetQuery method has been changed within the Ingeniux.Search.dll assembly. Site implementing InSite Search should update the GetQuery method calls to reflect changes that include a queryAnalyzer.

Step-by-Step

Open your InSite Search controller in your development environment.

Locate the line where the query variable is defined. (It should begin with something like var query = QueryBuilder.GetQuery.) In the parameters, add Reference.Reference.SiteSearch.DefaultQueryAnalyzer, as shown in the screenshot below.

Image of a Get Query Reference

Before:

var query = QueryBuilder.GetQuery(allTerms, categoriesList, typesList);

searcher.Search(query, collector);

After:

var query = QueryBuilder.GetQuery(Reference.Reference.SiteSearch.DefaultQueryAnalyzer, allTerms, categoriesList, typesList);

searcher.Search(query, collector);

After you've added the new code, save the file. 

  • PRODUCT: CMS
  • VERSION: CMS 9
  • Published: May 11, 2015
  • LAST UPDATED: September 18, 2023
  • Comments: 0

Please login to comment

Comments


There are no comments yet.