Hide Navigation

Configuration Reference

Your Stork configuration file defines the way your index is created and processed, and also controls some aspects of how your search results are displayed. The configuration file parser relies heavily on intuitive default values: if a field is inapplicable to your search index (or if you're happy with the listed default value), you can leave the field out of your configuration file.

Stork configuration files are guaranteed to be parseable in all future versions of Stork.

Input Options

Input options define how your files will be read and processed.

KeyTypeDefaultDescription
base_directoryStringN/A, RequiredThe directory to which each file path is relative. This file path must also be relative to the working directory.
filesArray of File objects[]The list of file objects Stork will index. (See the file object description below.)
url_prefixString""If all your files point to URLs with the same prefix, you can put the prefix here so you don't repeat it in each file object.
title_boostStringModerateOne of: Minimal, Moderate, Large, and Ridiculous. Determines how much a result will be boosted if the search query matches the title.
stemmingStringEnglishThe stemming algorithm the indexer should use while analyzing words. Should be None or one of the languages supported by Snowball Stem, e.g. Dutch.
srt_configSRT Config objectSee belowIf your list of files includes SRT Subtitle files, this object will describe how Stork will handle the timestamp information embedded in the file.

The File object

KeyTypeDefaultDescription
titleStringN/A, RequiredThe document title. Used mainly for display purposes, but search queries with words in the title are given a boost.
urlStringN/A, RequiredThe location this search result links to online; this value eventually becomes the href of the search result link.
pathOptional StringnullThe location of the document/file on disk. Each file object must have either a path or a contents field, but not both.
contentsOptional String""The contents of the document. Each file object must have either a path or a contents field, but not both.
stemming_overrideOptional StringnullIf the specific file requires different stemming rules than the rest of the corpus, you can override the stemming configuration here. Should be None or one of the languages supported by Snowball Stem, e.g. Dutch
filetypeOptional StringnullOne of: PlainText or SRTSubtitle. Usually, Stork can determine what kind of file it's looking at based on the file extension. If it's having trouble, you can override the derived filetype here.

The SRT Configuration object

KeyTypeDefaultDescription
timestamp_linkingBooleantrueShould Stork use the timestamp embedded in subtitle files to append the timestamp in the search result's URL?
timestamp_template_stringString&t={ts}The string that gets appended to the URL. {ts} gets replaced with the timestamp of that result's excerpt. The default template string is the string used by YouTube.
timestamp_formatStringNumberOfSecondsOne of: NumberOfSeconds. Determines the format of the timestamp that replaces {ts} in the template string. The default format, "number of seconds", is the timestamp format used in YouTube links.

Output Configuration

KeyTypeDefaultDescription
filenamestringoutput.stThe filename of the generated index file.
excerpt_bufferInteger8The number of words that will surround each search term in the displayed search results. Also determines what defines a nearby word when grouping nearby search results into a single match.
excerpts_per_resultInteger5Defines the maximum number of excerpts that will be shown for each search result, if multiple excerpts match the search query.
displayed_results_countInteger10Defines the maximum number of search results displayed in the list. Pushing this too high will result in performance issues.
debugBooleanfalseWhen true, Stork will output a pretty-printed JSON representation of the index. This option should only be used for debugging.

© 2019–2020

Stork is built and shepherded by James Little, who's really excited that you're checking it out. If you have any questions or comments, feel free to get in touch or open an issue on Github.

This site is also on Github; feel free to put up a PR or open an issue if you see something worth changing.