Flarum (2.x)
    Preparing search index...

    Class SearchManager<State>

    Type Parameters

    Index
    gambits: GambitManager = ...

    The gambit manager that will convert search query gambits into API filters.

    state: State

    An object which stores previously searched queries and provides convenient tools for retrieving and managing search values.

    MIN_SEARCH_LEN: number = 3

    The default minimum query length. The forum's configured minimum (search_min_length) takes precedence once the forum is loaded; admin settings search never requires more than this.

    SEARCH_DEBOUNCE_TIME_MS: number = 250

    Time to wait (in milliseconds) after the user stops typing before triggering a search.

    • The length of a query in characters, as compared against the minimum. Surrounding whitespace is not counted, since it is trimmed before the search is sent. Counts code points, so a character outside the Basic Multilingual Plane (such as some CJK ideographs) counts once, not twice.

      Parameters

      • query: string

      Returns number