Provides search functionality (use search-api.SearchService OSGi service name).

interface SearchService {
    hasStore(storeId: string): boolean;
    search(query: string, options?: SearchOptions): Search;
}

Methods

  • Returns true if the service knows a store with the given ID.

    Parameters

    • storeId: string

    Returns boolean

  • Searches items on one or more data sources using the given query.

    Parameters

    • query: string

      the search query

    • Optionaloptions: SearchOptions

      options to customize the search

    Returns Search

    An object that represents the state of the search.