Allows searching for features by text phrase.

Hierarchy (view full)

Constructors

Properties

_handles: Handles<unknown, ResourceHandle>

Do not directly reference this property. Use EventNames and EventTypes helpers from @arcgis/core/Evented.

providers: Collection<SearchProvider> = ...

Search providers that implement the search functionality. The collection is initially populated with built-in Geocortex providers, however providers can be added or removed. The order is significant -- the first registered provider that is able to handle a given data/FeatureSource!FeatureSource will be used for that source (see tasks/search/SearchProvider!SearchProvider.isSupported).

Accessors

Methods

  • Called to perform cleanup. Subclasses should override this method rather than destroy() to perform custom cleanup.

    Returns Promise<void>

  • Called after normal initialization. Note: Child items are initialized before this is called.

    Returns Promise<void>

  • Counts the number of features that match a search phrase in the given feature sources.

    Parameters

    • sources: Iterable<FeatureSource, any, any> | Collection<FeatureSource>

      The feature sources to search.

    • searchText: string

      The text to search for.

    • Optionaloptions: SearchOptions

      Options that affect the search.

    Returns AsyncIterable<CountResult, any, any>

    An iterator of tasks/CountResult!CountResult containing count results. If the search is canceled, the returned iterator might end prematurely and reject with an instance of data/FeatureSet!FeatureSet, though it may still succeed and return all count results.

  • Counts the number of features that match a search phrase in the layers of the given mapping/MapExtension!MapExtension's associated map.

    Parameters

    • mapExtension: MapExtension

      The map extension whose map will be searched.

    • searchText: string

      The text to search for.

    • Optionaloptions: SearchOptions

      Options that affect the search.

    Returns AsyncIterable<CountResult, any, any>

    An iterator of tasks/CountResult!CountResult containing count results. If the search is canceled, the returned iterator might end prematurely and reject with an instance of data/FeatureSet!FeatureSet, though it may still succeed and return all count results.

  • Counts the number of features that match a search phrase in the layers of the given map.

    Parameters

    • map: Map

      The map to search.

    • searchText: string

      The text to search for.

    • Optionaloptions: SearchOptions

      Options that affect the search.

    Returns AsyncIterable<CountResult, any, any>

    An iterator of tasks/CountResult!CountResult containing count results. If the search is canceled, the returned iterator might end prematurely and reject with an instance of data/FeatureSet!FeatureSet, though it may still succeed and return all count results.

  • A clean-up function that should get called whenever the item is disposed of.

    Returns Promise<void>

  • Determines whether this service is able to search the given source, i.e. Whether there is at least one registered provider for that source.

    Parameters

    Returns boolean

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

    Parameters

    • sources: Iterable<FeatureSource, any, any> | Collection<FeatureSource>

      The feature sources to search.

    • searchText: string

      The text to search for.

    • Optionaloptions: SearchOptions

      Options that affect the search.

    Returns AsyncIterable<Feature, any, any>

    An iterator of data/FeatureSet!FeatureSet containing search results. If the search is canceled, the returned iterator might end prematurely and reject with an instance of support/Cancellable!Cancellation, though it may still succeed and return all results.

  • Searches the layers of the given mapping/MapExtension!MapExtension's associated map for features that match a search phrase.

    Parameters

    • mapExtension: MapExtension

      The map extension whose map will be searched.

    • searchText: string

      The text to search for.

    • Optionaloptions: SearchOptions

      Options that affect the search.

    Returns AsyncIterable<Feature, any, any>

    An iterator of data/FeatureSet!FeatureSet containing search results. If the search is canceled, the returned iterator might end prematurely and reject with an instance of data/FeatureSet!FeatureSet, though it may still succeed and return all results.

  • Searches the layers of the given map for features that match a search phrase.

    Parameters

    • map: Map

      The map to search.

    • searchText: string

      The text to search for.

    • Optionaloptions: SearchOptions

      Options that affect the search.

    Returns AsyncIterable<Feature, any, any>

    An iterator of data/FeatureSet!FeatureSet containing search results. If the search is canceled, the returned iterator might end prematurely and reject with an instance of data/FeatureSet!FeatureSet, though it may still succeed and return all results.