KeywordSearch has two main nouns:

  • queries, which come in two flavors, Query, which is used for exact matches, and FuzzyQuery which is for fuzzy matches
  • and documents, which are strings wrapped in Document objects and can optionally have metadata associated with them.

Documents may also be collected into a Corpus, which is simply a Vector of Documents with additional metadata. Here, metadata simply refers to any NamedTuple stored in the .metadata field of the object.

Queries are used to search Documents or Corpuss via Base.match or match_all. If no match is found, nothing is returned; otherwise, a KeywordSearch.QueryMatch object is returned which contains details of the match.