Compass 2.0: Simplification, integration, and performance improvements
The Compass project, an open source project based on Lucene which aims to simplify the integration of search into Java applications, recently released version 2.0. InfoQ spoke with Compass founder Shay Banon to learn more about this release and about what Compass provides to the Java community.
Banon identified the major features of this release as:
- Simplification of O/R Mapping (ORM) integrations -- All of the integration features, such as real-time mirroring of ORM changes in the search index and complete mapping-based indexing of the database, are now available through configuration properties in the Hibernate/JPA configuration file
- Distributed data grid integration -- Integration with GigaSpaces, Terracotta and Coherence are now supported as methods for enabling Lucene index storage as part of a data grid, and the Lucene index can still be used transparently by Lucene libraries and tools
- Searchable data grid capability -- Changes which occur on the data grid are automatically mirrored to the Lucene index through the Object to Search Engine mapping and the integrations with Coherence CacheStore and the GigaSpaces mirror service
- Performance improvements -- Major internal enhancements in Compass combined with the improvements in Lucene 2.3 have resulted in a major increase in Compass performance
- Easy upgrade from Compass 1.2 -- The main API has remained the same, with configuration tweaks and minor API changes being documented in the upgrade notes. A reindex is also needed due to internal changes, but overall the upgrade process should be fairly simple
Compass, at its core, aims to simplify the integration of search into any Java application. Compass tries to simplify the API when working with a search engine. The API should be very familiar for people who are used to ORM libraries. Another main feature of Compass is the ability to easily map a Java object model into the search engine as well as other formats such as XML and Map like structures. On top of that, Compass steps even further and provides seamless integration with ORM libraries, data grids, and other.
Regarding Lucene, Compass is built on top of Lucene. All of Lucene features are exposed and can be used with Compass, but Compass tries to simplify its usage, especially within your typical Java application. Regarding Solr, I guess it also aims at simplifying Lucene, but in a different way. It exposes an http service for indexing and searching, but I heard that an "embedded" version of it will be available as well. I guess the main difference stems from a different viewpoint on how search is integrated into an application. I will just note that creating an http search service on top of Compass is very simple and many users have done just that.
When asked about future plans for Compass, Banon stated that most of the features are driven by user demand. Potential future ideas include looking at different indexing formats such as JSON, more comprehensive and full-featured data grid integration to enable colocated indexing and searching, and a UI layer search integration to create a better out-of-the-box experience. Banon also added that all Compass feedback and help is greatly appreciated.
Stephanie Davis (nee Stewart) Dec 21, 2014