When deploying a VertiGIS Studio Web app that is integrated with VertiGIS Studio Search, the original VertiGIS Studio Search configuration will be used by the deployed app(s) to prevent excessive copies of indexed data from being created. In some cases, like if each deployment stage has a separate environment or if it's critical that changes to the search configuration in development do not affect the later stage(s), it may be more desirable to have separate versions of the index. You can do this by creating a Universal search configuration for each deployed environment, as outlined below.
NOTE: This article is intended to offer a workaround for users who need a separate VertiGIS Studio Search configuration in each deployment stage of their VertiGIS Studio Web app. It does not follow the standard setup method for Universal search configurations, so there may be unexpected behaviour.
Setup Instructions
To proceed, it's important to first have an understanding of Environment Values in VertiGIS Studio Web. If you are unfamiliar with them, please see the following documentation for more information: https://docs.vertigisstudio.com/webviewer/latest/admin-help/environment-values.html
1 | Add the Universal Search Configuration(s)
- Open VertiGIS Studio Search Designer in the target deployment environment (e.g. production). If you only have one environment for all of your deployment stages, open your regular VertiGIS Studio Search Designer.
- Create a new Universal search configuration and give it a descriptive name (e.g. "My Web App - Search Config (prod)").
- Scroll down and expand the App Tokens for Search Client Access section.
- Add a New Token.
- In the Referrer URIs section, add the host for the target VertiGIS Studio Web app (e.g. https://apps.vertigisstudio.com or https://server.domain.com).
- Use the Create Resource button to add each of the layers in your VertiGIS Studio Web app that should be configured with VertiGIS Studio Search.
- Set up the resource settings (like searchable fields) so that they match the configuration in the development app.
- Save all of the changes.
- Repeat this process for each deployment environment.
2 | Configure the Environment Values in VertiGIS Studio Web
Studio Search Config ID
- Open your development app in VertiGIS Studio Web Designer.
- In the Deploy menu, click Environment Values.
- Click the Add Row button. Optionally, set the Title to something like "Studio Search Config ID".
- Open VertiGIS Studio Search Designer in the development environment.
- In the Configured Searches list, find the search configuration linked to the development app and click the copy button (
) for it under the Actions column.
- Back in the Environment Values section of VertiGIS Studio Web Designer, replace the word "dev" in the Development column of the new row with the configuration ID you just copied.
- Copy/paste the configuration ID(s) for the Universal search configuration(s) you set up earlier using the same process as steps 4-6, but for the appropriate deployment environment(s).
Studio Search Token
- In the Environment Values list, click the Add Row button. Optionally, set the Title to something like "Studio Search Token".
- Open VertiGIS Studio Search Designer in the development environment.
- Open the search configuration linked to the development app and expand the App Tokens for Search Client Access section.
- Click the copy button (
) next to the token.
- Back in the Environment Values section of VertiGIS Studio Web Designer, replace the word "dev" in the Development column of the new row with the token you just copied.
- Copy/paste the token(s) for the Universal search configuration(s) you set up earlier using the same process as steps 2-5, but for the appropriate deployment environment(s).
Subindex ID
NOTE: Each layer configured with VertiGIS Studio Search must have its own, separate entry.
- In the Environment Values list, click the Add Row button. Optionally, set the Title to something like "Layer Name - Subindex ID".
- Open VertiGIS Studio Search Designer in the development environment.
- Click on the the search configuration linked to the development app.
- In the Configured Resources list, find the layer you want to set up and click the copy button (
) for it under the Actions column.
- Back in the Environment Values section of VertiGIS Studio Web Designer, replace the word "dev" in the Development column of the new row with the subindex ID you just copied.
- Copy/paste the subindex ID(s) for the Universal search configuration(s) you set up earlier using the same process as steps 2-5, but for the appropriate deployment environment(s).
- Repeat steps 1-6 for each layer in your app that is configured with VertiGIS Studio Search.
Studio Search URL
- In the Environment Values list, click the Add Row button. Optionally, set the Title to something like "Studio Search URL".
- Replace the word "dev" in the Development column of the new row with the URL to the VertiGIS Studio Search service in your development environment (e.g. https://apps.vertigisstudio.com/search or https://server.domain.com/vertigisstudio/search).
- Enter the URL(s) for the VertiGIS Studio Search service(s) in the other deployment environment(s) under the appropriate columns.
Studio Search Portal Item
- In the Environment Values list, click the Add Row button. Optionally, set the Title to something like "Studio Search Portal Item".
- Open ArcGIS Online or Portal for ArcGIS Enterprise in the development environment.
- Search your organization's content for the name of your VertiGIS Studio Web app.
- There should be two exact matches: one for the VertiGIS Studio Web app and the other for the VertiGIS Studio Search configuration. You can see which one is which by checking the item descriptions.
- Open the item description page for the VertiGIS Studio Search configuration.
- Copy the URL from the address bar (e.g. https://organization.maps.arcgis.com/home/item.html?id=6b6af60c5bda4b0ea8bf7b7c8255d3a9 or https://server.domain.com/portal/home/item.html?id=6b6af60c5bda4b0ea8bf7b7c8255d3a9).
- Back in the Environment Values section of VertiGIS Studio Web Designer, replace the word "dev" in the Development column of the new row with the URL you just copied.
- Copy/paste the URL(s) for the Universal search configuration(s) you set up earlier using a similar process as steps 2-7, but for the appropriate deployment environment(s). NOTE: You will need to search for the name of your Universal VertiGIS Studio Search configuration, not your VertiGIS Studio Web app, and there should only be one exact match.
3 | Deploy the App
Once the above steps are complete, you can deploy your app. The Environment Values should automatically replace the necessary VertiGIS Studio Search connections so that your target app uses the environment-specific search index you created.
4 | Maintain the Environment Values
The majority of the setup only needs to be performed once per app. However, new Subindex ID entries must added to the Environment Values if you configure more layers with VertiGIS Studio Search in your development app.
Comments
0 comments
Article is closed for comments.