Search Manual / Version 2110
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 beans:
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 placeholder index documents for feeding errors or internal index documents, 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. In a CAE application you
generally just need the content bean id, which is stored in field id
. You can use
IDs of the search results to get the Content Bean objects back from the CAE using an
IdScheme
or IdProvider
. See the Content Application Developer Manual
for details on Content Beans and their IDs.