4.7. Implementing Custom Search

Custom search applications can use the full power of Apache Solr through Solr's Java API SolrJ. Please see the documentation of Apache Solr and its SolrJ API for details.

There are just a few things to keep in mind when implement search for content beans:

  • Feeder applications such as the CAE Feeder and the Content Feeder require separate Apache Solr cores. When searching you must specify a core in the Apache Solr URL to get results for the specific application only.

  • Successfully indexed documents carry the value SUCCESS in the index field feederstate. To avoid finding placeholder index documents for feeding errors or internal index documents, you should always add a feederstate:SUCCESS filter query to your queries.

You can restrict the number of returned fields in a search result by setting the Solr fl (field list) parameter. Generally you just need the content id, which is stored in field id. You can use IDs of the search results to get the Content objects back from the Unified API. See the CoreMedia Unified API Developer Manual for details.