The search functionality in Oskari can be extended, customized and configured in a number of ways. Different datasources can be exposed as search channels in Oskari. Search channels can provide textual search, reverse geocoding or both and can have other parameters that are passed to the datasource. Search channel access can be restricted by permissions and the queried channels (datasources) can be specified when making a search. By default all the available search channels are used for making searches, but this can be configured and customized.
- Guide for creating custom search channel
- Guide for creating ChannelProviders
- Guide for setting up WFS-based search channels
Configuring default search channels
Default channels are used for searching when no channel has been specified for the search. Search channels can specify if they should be included to be used in such queries. For channels extending and not overriding the
SearchChannel.isDefaultChannel() method this can be configured with oskari-ext.properties (
CHANNEL_ID is the annotated name of the channel like
There's also action route specific configurations for
GetSearchResult (textual search) and
GetReverseGeocodingResult (reverse geocoding) for default channels to use:
actionhandler.GetSearchResult.channels=[comma-separated list of channel ids] actionhandler.GetReverseGeocodingResult.channels=[comma-separated list of channel ids]
These will setup searches made using these action routes to use the configured channels and as channels are specified any default channel settings are not used.
Whitelisting enabled search channels
If you want to whitelist search channels and use only relevant ones for your application you can define a list of channel id's in oskari-ext.properties:
Channels generated by ChannelProvider components are not restricted by this setting. Provider channels are always added. Read more about ChannelProviders.
Things to improve (TODO)
- Parallel search
- Maybe add result SRS and have a common transformation so channels don't need to care about it
- Logic for result ordering
- Describe result items in more detail and make them more generic to support more properties
Last modified: Tue Mar 07 2017 13:56:13 GMT+0200 (EET)