close

Filter

loading table of contents...

Search Manual / Version 2110

Table Of Contents

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:

  • Feeder applications such as the CAE Feeder and the Content Feeder require separate Apache Solr collections. When searching you must always specify the collection name, for example as parameter of the SolrJ method org.apache.solr.client.solrj.SolrClient#query.

  • Successfully indexed documents carry the value SUCCESS in the index field feederstate. To avoid finding index documents that are used to store errors or internal state, 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 its numeric form in the index field id. You can use IDs of the search results to get the Content objects back from the Unified API. See the Unified API Developer Manual for details.

Search Results

Table Of Contents
warning

Your Internet Explorer is no longer supported.

Please use Mozilla Firefox, Google Chrome, or Microsoft Edge.