Search
Sitevision uses Apache Solr as embedded search engine. It is a mature and reliable platform that is built for efficient and really fast free-text searching. Sitevision contains several Solr indexes. Some of them requires a specific license:
An Index can be queried by WebApps/RESTApps, Scripts et al via Searcher in the Sitevision Public API. Searcher provides a flexible and powerful API to get search results from an index. See the Searcher section for more detailed info and examples.
var searchFactory = require('SearchFactory');
// Assemble a Searcher instance
var searcher = searchFactory.getSearcherBuilder().build();
// Execute
var searchResult = searcher.search('my query', 10);
// Process the SearchResult
if (searchResult.hasHits()) {
var hits = searchResult.getHits();
while (hits.hasNext()) {
var searchHit = hits.next();
/* Process SearchHit data */
}
} else {
/* Handle no hits at all */
}
An index can also be queried via the /search endpoint of the Sitevision Model REST-API.
Note that there's also an index for Collection Data Store data. Though, that index can only be accessed by permissioned WebApps/RESTApps via the Collection Data Store API.