Search allows users to search for locations, categories, and other points of interest within the venue.

Refer to the Search Guide for more information and interactive examples.

Properties

Methods

Properties

enabled: boolean

Whether the search is enabled.

false

Methods

  • Enables the search.

    Returns Promise<void>

  • Use query to search for locations based on a string input:

    • EnterpriseLocation: Specific places such as stores, restaurants, or washrooms.
    • EnterpriseCategory: Groups of locations, such as "Food Court" or "Electronics."
    • Places: Any main objects that can be searched for such as Space, Door, Point of Interest

    Search query returns a list of matching {@ link SearchResults} based on the input string.

    SearchResults include information about the type of match, the score (relevance), and detailed metadata about the matching items.

    Parameters

    • term: string

      The search term.

    • Optionaloptions: {
          enterpriseCategories?: {
              fields?: {
                  description?: boolean;
                  "locations.name"?: boolean;
                  name?: boolean;
              };
              limit?: number;
          };
          enterpriseLocations?: {
              fields?: { description?: boolean; name?: boolean; tags?: boolean };
              limit?: number;
          };
          places?: {
              fields?: { description?: boolean; name?: boolean };
              limit?: number;
          };
      }

      The search options.

    Returns Promise<SearchResult>

    The search results.

    const results = await search.query('Coffee Shop');
    console.log(results.locations);
  • Suggests the names of places, locations, and categories based on partial input. This is useful for creating an autocomplete feature for a search bar.

    Parameters

    • term: string

      The search term.

    • Optionaloptions: { enterpriseLocations?: { enabled?: boolean }; places?: { enabled?: boolean } }

      The suggest options.

    Returns Promise<Suggestion[]>

    The search suggestions.

    const suggestions = await search.suggest('Coffee');
    console.log(suggestions);
MMNEPVFCICPMFPCPTTAAATR