-
Notifications
You must be signed in to change notification settings - Fork 149
Federated Search in Portal for ArcGIS
Geoportal Server supports integrating federated search into the search page of Portal for ArcGIS 10.2 and up. After configuring this integration, users will see a list of catalogs on the search page they can submit the current portal search to. The results from the remote catalog will be displayed in the main search results area in Portal for ArcGIS. If the Geoportal Server facilitating the federated search is configured to use the Portal for ArcGIS Map Viewer, users can add supported services found in those remote catalogs to the Portal Map Viewer and save them in webmaps to the portal.
-
Copy provided 'custom' folder into the 'home' web application of your Portal for ArcGIS, e.g., \C:\Program Files\ArcGIS\Portal\webapps\home\custom
-
Edit 'config' sectio in \custom\federated-searches-json.js and add as many as needed REST endpoints of instances of Geoportal Server, for example:
{rest: "http://myserver/geoportal/rest/find/document", caption: "My Server"}
- Locate the 'search.html' file in the 'home' application of your Portal for ArcGIS, and add the following snippet of code just before the section
<style>
starts:
<script type="text/javascript" src="./custom/federated-searches-json.js">
</script>
<link rel="stylesheet" type="text/css" href="./custom/federated-searches-json.css">
-
Save the two files you adjusted.
-
To test, launch the Portal web application and do a search for content. When results are returned, you should see your server listed on the left, under the "Search additional catalogues" heading. Click the link to your server, and search results from your endpoint should appear in the interface.
-
Follow the 10.2 deployment steps above.
-
Open
federated-searches-json.js
that is within folder "custom". -
Remove the prefix "esri_" from the IDs, at lines 87 and 89.
var targetNode = dojo.byId("arcgisonline_sharing_dijit_SearchResultsSimple_0");
var targetHeaderNode = dojo.byId("resultsLabel");
var targetSortersNode = dojo.byId("arcgisonline_sharing_dijit_Sorter_0");
This is necessary because the the Portal for ArcGIS search.html page changed some IDs of HTML elements at 10.3.
Follow the 10.2 deployment steps above.
Open federated-searches-json.js
that is within folder "custom".
Remove the prefix "esri_" from the IDs, at lines 87 and 88.
var targetNode = dojo.byId("arcgisonline_sharing_dijit_SearchResultsSimple_0");
var targetHeaderNode = dojo.byId("resultsLabel");
Replace:
var targetSortersNode = dojo.byId("arcgisonline_sharing_dijit_Sorter_0");
with:
var targetSortersNode = dojo.byId("sorters");
This is necessary because the the Portal for ArcGIS search.html page changed some IDs of HTML elements at 10.3.1.