WoodWing Help Center

Adding custom Enterprise metadata properties to the Solr search

Adding custom Enterprise metadata properties to the Solr search

After adding a custom metadata property to Enterprise Server, it can be added to the Solr search index so that the time it takes to perform a search on that property is reduced. At the same time, the property can also be added as a facet to the Facet list in Content Station.

For the following steps, assume that a custom property named MYSTRING of type 'string' is added to Solr.

Tip: (For Enterprise Server 10.1 or higher only) Easily manage and configure settings of all configuration files by adding them to a single configuration file.

Adding the property to the schema.xml file

Step 1. Open the schema.xml file.

Step 2. Locate the comment <!-- Custom property definitions -->.

The Custom Property Definition section of the schema.xml file

Step 3. Add the following field outside the comments:

<field name="C_MYSTRING" type="onlySort" indexed="true" stored="true"/>

  • For the name value, enter the name of the custom property, prefixed by a 'C_'.
  • For the type value, see the comments in schema.xml file.

Step 4. (Optional) Add the property to the WW_CATCHALL field:

Step 4a. Locate the line <copyField source="Slugline" dest="WW_CATCHALL"/>.

The copyField commands section of the schema.xml file

Step 4b. Add the following definition after the last copyField line:

<copyField source="C_MYSTRING" dest="WW_CATCHALL"/>

Adding the property to the config_solr.php file

Step 5. Open the config_solr.php file.

Step 6. Locate the SOLR_INDEX_FIELDS option.

The SOLR_INDEX_FIELDS option in the config_solr.php file

Step 7. Add 'C_MYSTRING' to the list.

(Optional) Adding the property as a facet in the search results of Content Station

Step 8. In the config_solr.php file, locate the SOLR_GENERAL_FACETS option.

The General Facets option in the config_solr.php file

Step 9. Add 'C_MYSTRING' to the list.

Restarting Solr

Step 10. Restart Solr by restarting Tomcat server.

Reindexing Solr

Step 11. In Enterprise Server, access the Search Server Maintenance page.

Figure: The Search Server Maintenance page.

Step 12. In the Indexing section, click Clear followed by Start.

Testing the new configuration

Step 13. Perform a search for a known value of the custom property and verify that it is part of the search results.

Was this article helpful?
0 out of 0 found this helpful / Created: / Updated:
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.