4.5. Modify the Search Index

[Note]Note

Configuration not mandatory: Change the Apache Solr schema.xml in <solr-home>/configsets/content/conf if you want to add an index field used for search with CoreMedia or native search engine APIs.

By default, search is performed in index fields textbody, name_tokenized, numericid and their language-dependent variants textbody_* and name_tokenized_* when using the /editor request handler configured in file <solr-home>/configsets/content/conf/solrconfig.xml. This request handler is used when you perform a search in Studio or in the Site Manager. The content from the document properties is fed into the textbody index field. This default request handler configuration is useful for most situations.

Only if you want to search in an additional field but not in the textbody field, you can add the additional index field in the file schema.xml. Then you can feed the field with a PropertyField or FeedablePopulator as described in Section 4.2, “Configure the Content Feeder”.

You can search in a specific field with the method SearchService#searchNative from the Unified API (for details see CoreMedia Unified Developer Manual, Section "Search Service" in chapter "The Content Repository"). Another possibility is to use the search engine native API directly.