Search Manual / Version 2207
Table Of ContentsCustom 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 fieldfeederstate
. To avoid finding index documents that are used to store errors or internal state, you should always add afeederstate: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.