Documentation Center

Adding a Solr Collection

If you do not want to use the default collection name, "collectionSDL_Contenta_Sample", you will need to add a new Solr collection.

About this task

You can index no more than one Contenta database in a Solr Collection. Therefore, if you want to index a second database, you must add a collection for it. Each database you index must be exclusively indexed in a separate Solr collection. A Solr Collection may contain one, many, or all Configurations from a database.

To add a Solr Collection for Contenta

To get you going, we provide the collectionSDL_Contenta_Sample collection in the content_home\tools\Solr\example\solr directory.

Procedure

  1. In Windows Explorer or a Linux terminal window, copy the Sample collection.

    Right click on collectionSDL_Contenta_Sample and then click Copy from the pop-up menu.

  2. Right-click, and then click Paste from the pop-up menu,
  3. Rename the copied collection. For example, “FA18_Avionics_DB.”
    Solr collection names cannot contain spaces.
  4. Double-click the new collection to open it.
  5. Delete the Data directory.
  6. Open the core.properties file in a text editor, and rename the collection name to match the name you gave to the new collection (see core.properties)
  7. Save and exit the text editor.
  8. From the Services panel in Windows (or from the command-line in Linux), start the Solr service/daemon (or restart if Solr is already running).
  9. Your collection needs to be configured in the AppData of the database that will be indexed in the collection. This may already have been done when you ran upgrade_56 or newdb.pl. If you still need to add your new collection to AppData, open the Solr dashboard by entering the following URL in your browser:

    http://hostname:8983/solr/#/ or https://hostname:8983/solr/#/

    The Solr dashboard appears.

  10. In the lower-left corner of the Solr dashboard, click the name of the Solr collection you just added from the Core Selector drop-down list. In the web address field, select and copy the exact URL of this collection path.
  11. Revise AppData to use the new collection.
    • In the left pane of AppData, expand {Global}, and then expand Collections.
    • You may need to rename Collection key to reflect the name of your new Solr collection.

      Click the collection under the Collections key, and then click Rename Key.

      The default name of this collection is collectionSDL_Contenta_Sample

    • Enter the desired collection name. For example “F18_Avionics_DB.”
    • Click the URL Value under your newly renamed collection key.
    • Click Modify Value.
    • Paste the collection URL you copied earlier from the Solr dashboard into the Value field.
    • Click OK.
  12. Enter the DATABASES_TO_INDEX registry setting for the new collection (see Registry Keys used to Configure the Crawler for all Databases).

    The Solr dashboard is also used for process monitoring and debugging. Consult the Solr documentation for a discussion of appenders and loggers.