Marshling of Compass

The way OSEM work is by marshalling the mapped domain model into a Resource (Compass low level search engine data holder, for Lucene users – a Document) and unmarshalling the domain model from a Resource loaded from the search engine. The benefit of using Resources is by having a single API for displaying search results (think of a result as a Map) regardless of the type of Object saved. By using a consistent semantic model (i.e. always mapping certain properties to the same meta-data value), the application can iterate through the search result and display a “title” meta data for example. This allows an application to only worry about persisting the domain model into the search engine, but use Resources for displaying search results. If the application is only going to use Compass for persisting domain model into the search engine, Compass can perform several major performance improvements.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s