Skip to end of metadata
Go to start of metadata

If you have set up multilingual datasets (using the Metadata Server), then you need to keep the search index updated whenever there is a change to either the catalogue or the external multilingual/metadata database.

When you have multilingual datasets and search configured, search queries will search through the names of fields and values in the currently selected dataset language.

To update the search index you need to run the script BuildMetadataSearchIndex.bat, which is located in the SuperADMIN program data directory. If you installed to the default location, it will be located at C:\ProgramData\STR\SuperADMIN\MetaData\MetaDataUtilities\BuildMetadataSearchIndex.bat

Step 1 - Update databases.txt

This is a text file that specifies which SuperSTAR datasets you want to include in the index. It is located in the same directory as the indexing script.

You need to update this file so that it contains a list of all the datasets on your deployment that you want to be indexed.

You should include all your datasets in the index. If you have datasets that not all users have access to, then you can still include these in your index. SuperADMIN will automatically take care of permissions. When a user searches in SuperWEB2, the search results will automatically be filtered so that they only contain results from datasets and fields that the user has permission to access.

You can either update databases.txt manually or use the createdatabaselist command in SuperADMIN.

The file must use the following format (if you use the SuperADMIN command it will generate a list of all of your SuperSTAR datasets in this format):



The ID of the dataset in the SuperSTAR catalogue.
The dataset display name from the SuperSTAR catalogue.
The full path to the .sxv4 file that contains the dataset but without the .sxv4 file extension.

For example, the shipped databases.txt file is as follows. This would instruct the batch process to index the sample People and Retail Banking datasets:

people|people|C:\ProgramData\STR\SuperSERVER SA\databases\People
bank|bank|C:\ProgramData\STR\SuperSERVER SA\databases\RetailBanking

When you have finished editing databases.txt, save the file.

You are recommended to save this file in the same location as the standard shipped file. If for any reason you want to save the file to a different location, you must update SET DB_FILE_LIST="databases.txt" in BuildMetadataSearchIndex.bat before running the script so that it contains the full path to your new location of the databases.txt file.

Step 2 - Configure BuildMetadataSearchIndex.bat

Before you can run the indexing script, you need to configure some settings so that it can connect to your external metadata database.

You can use the same JDBC driver that you used to create the external metadata database (when you ran BuildMetadataTemplate.bat during the Metadata Server set up process).

Open BuildMetadataSearchIndex.bat in a text editor. Modify the following lines:

Locate the Following Line:Make This Change:

Add the details of the JDBC database driver to use to connect to your external database.

For example, to use the Microsoft SQL Server JDBC driver, set the driver class as follows:


Add the full path to the location of the JDBC driver (jar file) on your system.

For example:

SET DB_DRIVER_LOCATION="C:\drivers\SQLServer\sqljdbc_4.0\sqljdbc4.jar"

Add the connection string the script will use to connect to your metadata database.

For example, for SQL Server the connection string is similar to the following:

SET DB_URL="jdbc:sqlserver://MYSERVER;databaseName=Metadata;user=mydbuser;password=myuserpassword;"

Replace the server and user details with the appropriate values for your system.

In this example:

  • MYSERVER is the server name.
  • Metadata is the name of the metadata database you created in the previous step.
  • mydbuser is the user account to connect to the database with.
  • myuserpassword is that user's password.

Add the repository ID. This must be the same value that you used when you created the external metadata database.

For example:

SET REPOSITORY=metadatadbid

Step 3 - Check the Index Location in BuildMetadataSearchIndex.bat

There is a setting in the indexing script (DESTINATION_FOLDER) that instructs it where to generate the index files. There is also a setting in SuperADMIN that determines where it will look for the generated index when a user performs a search (you can check this using the command gc search indexDirectory).

By default, these are both set to the meta_search_index directory in the SuperADMIN program data directory (by default, C:\ProgramData\STR\SuperADMIN\server\meta_search_index). The predefined index that is supplied with SuperSTAR (which covers the sample Retail Banking and People datasets) is located in this directory.

When you run the script to update the index, the first thing it will do is to remove the existing index. This means with the default settings, search would be unavailable to users until the index is rebuilt (which may take some time, particularly if you have a large number of datasets).

For this reason, you are recommended to take the following steps when updating the index:

  1. Update the DESTINATION_FOLDER setting in the BuildMetadataSearchIndex.bat script to point to a new location.
  2. Run the script.
  3. When the script finishes, update SuperADMIN to use the new location.

This will ensure that there is no downtime of the search index and that users can continue to search (using the old index files) while you are doing the update.

The following steps assume you are going to build the index to a new location to avoid downtime. If you are not concerned about search being unavailable, then you can simply execute the indexing script. Once it has completed, log in to SuperWEB2 and check that search now includes all your datasets.

To update the index location and rebuild the index:

  1. Open BuildMetadataSearchIndex.bat in a text editor.
  2. Check the DESTINATION_FOLDER setting. By default, this is set as follows:

    set DESTINATION_FOLDER="%SA_PROGRAM_DATA%\server\meta_search_index"

    This indicates that the search index files will be saved to the meta_search_index directory in the SuperADMIN program data directory (by default, C:\ProgramData\STR\SuperADMIN\server\meta_search_index).

  3. Update the location to a new directory. For example:

    set DESTINATION_FOLDER="%SA_PROGRAM_DATA%\server\meta_search_index_multilingual_july_2014"

    You do not need to create this directory; the index script will automatically create it when it runs.

  4. Save your changes to the file.
  5. Run BuildMetadataSearchIndex.bat, and wait for it to finish indexing your datasets.
  6. Go to SuperADMIN and use the the following command to update the index location to your new location:

    > gc search indexDirectory value "meta_search_index_multilingual_july_2014"
  7. Go to SuperWEB2 and check that search now includes all your datasets and languages.

  • No labels