Search in external sources only
Assume you have indexed JCR content, and some external sources. The external sources can be some sources fetched over http, some RDBMS sources, some source from an external DMS like alfresco or nuxeo, etc. Now, you might want to search for example only in the external http or https sources. Since these sources are indexed as IdentifiableContentBean as well, you could also use the technique of Search for specific ContentBean's only, and for example search for MyExternalContentBean. However, you can also choose to search in an external scope. Assume the MyExternalContentBean all have a getIdentifier() that starts either with http: or with https:.
You can then search for external http(s) sources only as follows:
HippoSolrClient solrClient = HstServices.getComponentManager().getComponent( HippoSolrClient.class.getName(), "org.hippoecm.hst.solr"); HippoQuery hippoQuery = solrClient.createQuery(query); hippoQuery.setScopes("http:", "https:");