Firesearch.dev - Serverless full-text search

Indexes

Indexes store Documents and can perform search queries.

Firesearch supports both full-text indexes, and autocomplete indexes—while their underlying behaviour is different, the APIs are very similar.

  • Creating indexes
  • Index path
  • Index options
  • Creating indexes

    The easiest way to create an index is to use the Create new index web form. create new index web form in the Firesearch console. You may also do so programmatically using the CreateIndex method on the appropriate service in the Firesearch API.

    An index is created using a payload like this:

    The Index path

    The Index path uniquely identifies the indexes. You use it when putting documents and making searches.

    The Index path also refers to the Firestore location that holds the data for the index.

    • Index paths must point to a Firestore collection (not a document), which means it must have an odd number of path segments.

    Index options

    When you create an index, you can tune its behaviour. This section gives you an overview of those options.

    Language tells Firesearch which language to use when processing the text.

    The following languages are supported:

    • english (default)
    • dutch
    • french
    • german
    • russian
    • spanish
    • swedish

    Keep stop words tells Firesearch to keep words like "and" and "to" in the index, depending on the language.

    Without stop words (default)
    good bad ugly
    Keep stop words
    the good the bad and the ugly

    Keeping stop words will result in a larger index

    Case sensitive tells Firesearch to preserve the case of the search text. By defaut, Firesearch transforms text to lowercase. This option does not affect the index size.

    Lowercase (default)
    code should not be clever
    Case sensitive
    Code should NOT be clever
    In case sensitive indexes, the case of search terms must match exactly the documents otherwise they will not be included in the results

    No stemming allows you to tell Firesearch not to stem words down.

    Stemming (default)
    interest times
    No stemming
    interesting interest in interesting times

    Not stemming words will result in a larger index

    What next?