Solr Integration
Solr Search in Backoffice is integrated on the Cockpit Data Integration layer. It introduces a new implementation of the strategy FieldSearchFacadeStrategy, which makes the communication on the Backoffice - Solr level possible.
Solr Implementation
The integration is done on the Cockpit Data Integration Layer. The DefaultSolrFieldSearchFacadeStrategy, which has been introduced as the strategy responsible for the Solr Search communication with Backoffice, implements the FieldSearchFacadeStrategy.
Diagram: FieldSearchFacade and search strategies.
Underneath, the Solr implementation in Backoffice uses the Search and Navigation Module. It bases on the functionalities available out-of-the-box in this module, with one important addition - a new itemtype called BackofficeIndexedTypeToSolrFacetSearchConfig. This itemtype is responsible for determining whether Solr Search is to be used for a given type. This way, all other Solr indexes existing in the system (for example, the indexes used by storefronts) do not affect Backoffice configuration. When a search is run for a given type, a decision is made whether to use Solr search strategy instead of the default flexible search strategy basing on the mapping defined in the BackofficeIndexedTypeToSolrFacetSearchConfig itemtype. This approach makes the functionality more transparent for end users.
The following diagram shows Solr Search flow on the facade layer:
Diagram: Solr Search flow on the facade layer.
The DefaultSolrFieldSearchFacade returns the BackofficeSolrPageable instance, which runs the actual search. It gets a list of objects PKs from Solr and then loads the list of actual ItemModel objects from the database using the SolrFieldSearchDAO class. This flow is presented on the following diagram:
Diagram: Solr Search flow - getting items by PKs.
Limitations
Solr Search in Backoffice works only for the Simple Search mode of the Advanced Search widget. For the Advanced Search mode of the Advanced Search widget, the flexible search is used.