Search app - Tizra/Tizra-Customer-Tracker GitHub Wiki

1. Introduction

The search app is controlled by a JavaScript object called the config. The config is built by combining an internal default config with TOML supplied in the SearchConfig design parameter.

Advanced configs can use SearchConfigJs instead of SearchConfig which allows including functions and promises in the config, but this isn’t necessary for most sites.

The cookbook examples below all use TOML syntax.

2. Cookbook

Default configuration:

[metaTypes]
metadata = ['Book', 'PageRange']
fulltext = 'PdfPage'

Change full-text searching to use excerpt indexing:

[metaTypes]
fulltext = 'PageRange'

Search articles metadata and full-text in addition to the defaults:

[metaTypes]
metadata = ['Article', 'Book', 'PageRange']
fulltext = ['Article', 'PdfPage']

2.2. Enable full-text toggle by default

[fields]
depth.defaultValue = 'fulltext'

2.3. Disable cover images in results

[results]
showCoverImage = false

Modify "Include in Advanced Search?" for the given fields in the Tizra Admin.

Set quickSearchFields in site settings in the Tizra Admin. The default is Title;Authors;Abstract

3. Reference

The full config is the combination of:

  1. default-config.js in the search app sources (link for Tizra developers only)

  2. customer-supplied SearchConfig or SearchConfigJs

  3. response from the search-types API, which includes things like the field types and whether they’re marked "Include in Advanced Search" in the admin.

You can see the full derived configuration for a site by appending ?debug to the advanced search. For example on the Tizra support site: https://support.tizra.com/~advancedSearch?debug

⚠️ **GitHub.com Fallback** ⚠️