Options
All
  • Public
  • Public/Protected
  • All
Menu

A OfflineSearch is an offline search module. It can be initialized at any time by passing the Mappedin object and a set of {@link TMappedinOfflineAllSearchOptions} options.

Hierarchy

  • OfflineSearch

Index

Constructors

Methods

  • Add a custom query to the search index

    Parameters

    • params: { object: MappedinLocation | MappedinCategory | Record<string, unknown>; query: string; weight?: number }
      • object: MappedinLocation | MappedinCategory | Record<string, unknown>

        Object that is returned when query matches

      • query: string

        Query string to match for this object

      • Optional weight?: number

        Optional weight to multiply by the score

    Returns Promise<void>

  • toJSON(): Promise<string>
  • Export search index to JSON for storage/caching - this would avoid having to re-index on page reload

    Returns Promise<string>