Apps and bundles

App configuration

The features of the map.apps Smart Search Extension are activated by adding the corresponding bundles to the app configuration.

The recommended way to add bundles to an app is via the map.apps Manager:

  • Log in to the manager as editor or admin user

  • Click on the app in the Apps tab that should use smart.search features

  • Select the bundles action

  • Display the installed bundles by clicking on +.

  • Search and select the smart.search bundle sf_smartsearch to be added

  • Save and close the app configuration

Extended configuration of the bundles

In addition to the minimum configuration, other search parameters can be set. The default settings of the search can be adjusted in the app.json file of the respective app.

target

URL to smart.finder Server.

Default: @@finder.service.url@@/smartsearch

title

Title displayed in omnisearch.

Default: smart.search

description

Tooltip of the entry in the omnisearch.

Default: Find features

omniSearchLabelString

Configuration of the result view in the omnisearch. You can use all fields that are returned against the index in a search.

Default: ${title} [${layer}]

omniSearchDefaultLabel

Placeholder in the Ominearch.

Default: Enter search term…​

fq

Specify a filter query.

With the help of this parameter, the search can be further restricted without considering the score.

Default: -
Sample:
The layers A, B, and C are present in the index. A, B, and C correspond to the value descriptiveName specified in the spring-feature-layer-config.xml file for the respective layer.
The view of an app should now be restricted to layer A. The corresponding filter query is: layer:A
If you want to restrict the view to layers A and C, the filter is: layer:(A OR C)

editDistance

The editDistance determines the minimum number of edit operations of a query expression (e.g. inserts, deletes, replacements).

Allowed values:

false

do not use

true

use server default, equal to 2

0

exact

1

similar

2

dissimilar

Default: true

type

Object consisting of id and title.

id restricts query to layers (q += "&Layer:" + type.id), title is appended to the title of the result.

Default: -

appendTypeToResult

If set, title is appended to the title of the result item.

Default: false

singleBoostWeight

Weighting for hits containing at least one search term.

Default: 98

groupedBoostWildcardWeight

Weighting for hits containing all search terms.

This parameter is only used if several search terms are entered.

Default: 99

groupedBoostWeight

weighting for complete hits on the search term.

Default: 100

useCustomSorting

Determines whether a user-defined sorting should be performed instead of the above boosting parameters.

If the parameter is set to true, all boosting parameters are ignored and suggested results are sorted by the configured field.

Default: false

sortField

Sets the field for sorting if useCustomSorting is enabled.

Default: title_string

sortOrder

Determines the sort order if useCustomSorting is enabled.

Allowed values: asc, desc
Default: asc

The settings in the following example can also be made via Live Configuration (Live ConfigurationSearch & Selectionsmart.search: Store).
Extended configuration
"SmartSearchStore": {
    "target": "@@finder.service.url@@/smartsearch",
    "selectedChild": 0,
    "title": "smart.search",
    "description": "Find features",
    "omniSearchLabelString": "$\{title\} [$\{layer\}]",
    "omniSearchDefaultLabel": "Enter search term...",
    "additionalParams": {
      "fq": ""
    },
    "editDistance": true,
    "type":{
        "title": "title",
        "id": "LayerId"
    },
    "appendTypeToResult": true
}

The following is an example of a customized configuration for using alphabetical sorting by the title_token field

Extended configuration
"SmartSearchStore": {
    "useCustomSorting": true,
    "sortField": "title_token",
    "sortOrder": "asc"
}

Use of smart.finder and Smart Search Bundles

If both smart.finder bundles and these bundles of the map.app Smart Search Extension are registered in the map.apps instance used, you must deactivate the FacetedSearchFinderStore component in app.json for each app that is to use only the Smart Search functions as follows

Extended configuration
"bundles": {
    [...]
    "sf_store": {
        "DocumentStore": {
          "componentEnabled": false
        }
    }
    [...]
}

Structure of the index

The further steps to build the index and to link the attributes of an ArcGIS Server layer with the fields of the index are described in the smart.finder documentation: