Skip to content

Text Search

Defines all properties for text-search in a schema

Properties

Property Type Required Description
schema string yes The schema for the text search objects.
configurations array of object Text Search Configurations.
dictionaries array of object Text Search Dictionary.
parsers array of object Text Search Parsers.
templates array of object Text Search Templates.

configurations[]

Property Type Required Description
name string yes The name of the text search configuration to be created.
sql string User-provided SQL.
parser string The name of the text search parser to use.
source string The name of an existing text search configuration to copy.
mappings object Each token type the configuration maps, with the dictionaries a token of that type is looked up in, in order (ALTER TEXT SEARCH CONFIGURATION ... ADD MAPPING).
comment string Comment.

Mutually exclusive forms

Exactly one of these must hold:

  • sql, without parser or source
  • parser, without source or sql
  • source, without parser or sql

dictionaries[]

Property Type Required Description
name string yes The name of the text search dictionary to be created.
sql string User-provided SQL.
template string The name of the text search template that will define the basic behavior of this dictionary.
options object Template specific options.
comment string Comment.

Mutually exclusive forms

Exactly one of these must hold:

  • sql, without template or options
  • template, without sql

parsers[]

Property Type Required Description
name string yes The name of the text search parser to be created.
sql string User-provided SQL.
start_function string The name of the start function for the parser.
gettoken_function string The name of the get-next-token function for the parser.
end_function string The name of the end function for the parser.
lextypes_function string The name of the lextypes function for the parser (a function that returns information about the set of token types it produces).
headline_function string The name of the headline function for the parser (a function that summarizes a set of tokens).
comment string Comment.

Mutually exclusive forms

Exactly one of these must hold:

  • sql, without start_function or gettoken_function or end_function or lextypes_function
  • start_function and gettoken_function and end_function and lextypes_function, without sql

templates[]

Property Type Required Description
name string yes The name of the text search template to be created.
sql string User-provided SQL.
init_function string The name of the init function for the template.
lexize_function string The name of the lexize function for the template.
comment string Comment.

Mutually exclusive forms

Exactly one of these must hold:

  • sql, without lexize_function or init_function
  • lexize_function, without sql

No other properties are accepted.


Source: schemata/text_search.yml · Resolved JSON Schema: text_search.json