search

Available for:Map Panel

Search Access Point

Geospatial Portal SDK provides the unified search access point and a shortcut for specific searches.

Currently supported search types involves:

  • Name Search - including (apart of the default Search Services): WMPS Search, Backend Search and Custom Search.
  • APOLLO Search ({searchType: "ApolloCatalog"}) - APOLLO Catalog Search

They can be used either in UI or API mode, which is set by the activeSearchHandle parameter.

While invoking the search action, it is possible to provide the search query and the result items limit. Please note that each search service may have limit set on the server side. Thus, the minimum of the values will be used. e.g. Consumer Portal Backend has the default number of search results limited to 60.

Please note that APOLLO Search mechanism provides only free text search ability.

Methods

Name Summary
apollo

Search in CustomSearch enabled searcher services

backend

Search in Backend enabled searcher services

custom

Search in CustomSearch enabled searcher services

names

Search in all enabled searcher services

this()

Search enabled searcher services

wmps

Search in WMPS enabled searcher services

Methods • Details

apollo(config, callback, errback) → {ApolloSearchResult}

Available for:Map Panel

Search in CustomSearch enabled searcher services

Parameters

Name Type Description
config Object|String
{
 "query": String,
 "limit": Number,
 "ash": Boolean
}

search configuration or search query

query

query

limit optional

Default value: 200.

Result items limit

ash optional

Default value: "api".

Indicates which active search handle will be used for search (default "api" or "ui")

callback function optional

callback executed if operation succeeds

errback function optional

callback executed if operation fails

Returns

TypeDescription
ApolloSearchResult

search result

backend(config, callback, errback) → {NameSearchResult}

Available for:Map Panel

Search in Backend enabled searcher services

Parameters

Name Type Description
config Object|String
{
 "query": String,
 "limit": Number,
 "ash": Boolean
}

search configuration or search query

query

query

limit optional

Default value: 200.

Result items limit

ash optional

Default value: "api".

Indicates which active search handle will be used for search (default "api" or "ui")

callback function optional

callback executed if operation succeeds

errback function optional

callback executed if operation fails

Returns

TypeDescription
NameSearchResult

search result

custom(config, callback, errback) → {NameSearchResult}

Available for:Map Panel

Search in CustomSearch enabled searcher services

Parameters

Name Type Description
config Object|String
{
 "query": String,
 "limit": Number,
 "ash": Boolean
}

search configuration or search query

query

query

limit optional

Default value: 200.

Result items limit

ash optional

Default value: "api".

Indicates which active search handle will be used for search (default "api" or "ui")

callback function optional

callback executed if operation succeeds

errback function optional

callback executed if operation fails

Returns

TypeDescription
NameSearchResult

search result

names(config, callback, errback) → {NameSearchResult}

Available for:Map Panel

Search in all enabled searcher services

Parameters

Name Type Description
config Object|String
{
 "query": String,
 "limit": Number,
 "ash": Boolean
}

search configuration or search query

query

query

limit optional

Default value: 200.

Result items limit

ash optional

Default value: "api".

Indicates which active search handle will be used for search (default "api" or "ui")

callback function optional

callback executed if operation succeeds

errback function optional

callback executed if operation fails

Returns

TypeDescription
NameSearchResult

search result

this()(config, callback, errback) → {NameSearchResult}

Available for:Map Panel

Search enabled searcher services

Parameters

Name Type Description
config Object|String
{
 "query": String,
 "searchType": String,
 "limit": Number,
 "ash": Boolean
}

search configuration or search query

query

query

searchType optional

search service type (null - all services, WMPSSearch, SearchBackend, ApolloCatalog, CustomSearch)

limit optional

Default value: 200.

Result items limit

ash optional

Default value: "api".

Indicates which active search handle will be used for search (default "api" or "ui")

callback function optional

callback executed if operation succeeds

errback function optional

callback executed if operation fails

Returns

TypeDescription
NameSearchResult

search result

wmps(config, callback, errback) → {NameSearchResult}

Available for:Map Panel

Search in WMPS enabled searcher services

Parameters

Name Type Description
config Object|String
{
 "query": String,
 "limit": Number,
 "ash": Boolean
}

search configuration or search query

query

query

limit optional

Default value: 200.

Result items limit

ash optional

Default value: "api".

Indicates which active search handle will be used for search (default "api" or "ui")

callback function optional

callback executed if operation succeeds

errback function optional

callback executed if operation fails

Returns

TypeDescription
NameSearchResult

search result