Configuring Queries Based on Specific Fields in InSite Search

Product: InSite Search

Version: All, ISS 2, 2.6, 2.6.12

Published: June 1, 2017

Last updated: 1/30/2021

Comments:
0 Comments

Description

In InSite Search 2.6.12 and above, administrators can adjust your search results by configuring a list of targeted fields to query against.

Purpose

Depending on the indexed data set for InSite Search, the default behavior may result in large, complex queries. This new feature aims to improve performance and results by allowing administrators to target fields, selectively.

Requirements

  • InSite Search 2.6.12 and above.
  • CMS 9 SR6 and above (requirement for InSite Search 2.6.12).
  • CMS Published content to be rendered through a DSS site.

Step-by-Step

  1. Open your DSS project in Visual Studio (VS) and update to the latest version of InSite Search 2 via NuGet Package Manager.
  2. Rebuild your VS project.
  3. Download the following sample configuration file: QueryFields.xml

    QueryFields Configuration File

  4. Open QueryFields.xml in an editor and change the root element's enabled attribute to true.
  5. Modify the configuration file to include additional field element:
    • Typically, field names are the element names that are expected to be returned.
    • Each field name needs to be positioned between the Field tags.
    • If the file does not contain any field elements, then the matching fragments will fall back to the default state, which is to query all fields.
  6. Save your configuration file to a new folder within the \Prebuilt folder of your CMS site (e.g., \Prebuilt\Configs).
  7. Within your CMS, go to the Administration > InSite Search Configuration > Settings area and add a new Custom Setting to your CMS SearchSource.config on publish:
    • Name: QueryFieldsFileLocation
    • Value: Enter the absolute path to the configuration file as it resides on the DSS server after replication (e.g., C:\MyDssSite\Content\Prebuilt\Configs\QueryFields.xml).

      QueryFieldsFileLocation

  8. Publish your CMS. This action replicates QueryFields.xml and the updated SearchSource.config to your DSS server.

Additional Information

  • This feature may require some level of understanding of the indexed data structure within the InSite Search's Lucene index.
  • This feature requires a separate configuration file, referenced through a Custom Setting defined within the SearchSource.config file that is configured and generated from the CMS (Administration > Search Configuration > Settings > Custom Settings).

    These configuration files are intended to reside on the same server environment as the DSS where the InSite Search implementation lives.

    Note: To ease the workflow of configuring each file, you can place the them in a new folder within your CMS \Prebuilt asset location e.g., \Prebuilt\SearchConfigs. This way, modified files can be uploaded through the CMS Asset Manager to this new folder. At this point, they will be copied over to the DSS server(s) during a publish/replication cycle. Once the files are in place, configure each Custom Setting via the CMS to point to the absolute path of the configuration file.

  • If you choose to manage the above configuration file outside of the CMS process, check them into the \Config folder at the root of your DSS project. This method does not require setting a Custom Setting value through the CMS, as InSite Search v2 will load these files automatically if it finds them residing within \Config.

Comments

There are no comments yet.