A search provider for sources that support querying.

Hierarchy (view full)

Constructors

Properties

queryService: QueryService = ...

The query service that will be used to perform the search.

Methods

  • Invoked to perform the actual work for count. Derived classes should override this method rather than count().

    Parameters

    • sources: FeatureSource[]

      The source to search.

    • searchText: string

      The text to search for.

    • options: SearchOptions

      Options that affect the search.

    Returns Promise<CountResult[]>

  • Invoked to perform the actual work for search. Derived classes should override this method rather than search().

    Parameters

    • sources: FeatureSource[]

      The source to search.

    • searchText: string

      The text to search for.

    • options: SearchOptions

      Options that affect the search.

    Returns AsyncIterable<Feature, any, any>

  • Generate search terms from the search text and tokenizer.

    Parameters

    • searchText: string

      The original search text.

    • tokenizer: ((s: string) => string[])

      The elasticlunr tokenizing function.

        • (s): string[]
        • Parameters

          • s: string

          Returns string[]

    Returns string[]

  • Determines whether this provider can handle searches for the given feature source.

    Parameters

    Returns boolean

  • Searches a given feature source for features that match a search phrase.

    Parameters

    Returns AsyncIterable<Feature, any, any>

    An iterator of data/Feature!Features containing search results. If the search is canceled, the provider may reject the returned promise with an instance of support/Cancellable!Cancellation, though it may still fulfill with search results instead.