Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Search Oracle Coherence grid with Lucene

DZone's Guide to

Search Oracle Coherence grid with Lucene

· Java Zone
Free Resource

Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code! Brought to you in partnership with ZeroTurnaround.

Traditionally full text search engines such as Apache Lucene/Solr are implemented as infrastructure separate from core application. Such "search as a black box" approach allows painless integration with a whole variety of application on variety of platforms. But some use cases require search functionally to be deeply integrated with application and blackboxed solution will just add unnecessary complexity.

In-memory-data-grids (IMDG) are often used for storing huge amount of documents in memory (with lightning fast access time). While most IMDG have own indexing/queering machinery, they do not provide such rich full text search features as Lucene do. It is possible to build separate search infrastructure to complement data grid (using Lucene or some enterprise search product), but now you have to maintain it, keep content of grid and search index in sync, which is doable but adds complexity.

While dedicated search infrastructure may add some value on top of full text search, in many cases ability to execute Lucene queries over sets of objects in data grid would be just enough.

And if your data grid is Oracle Coherence you may have this ability right now!

Coherence 3.6 has added ability to plug custom index engines into grid and Lucene integration package provides you with everything you need to plug Lucene in. Coherence grid itself will manage all life cycle of index for you, it will create index, populate it with objects, keep up to date and handle partitioning and recovery. And you do not need to maintain dedicated search infrastructure if you are using embed Lucene index with Coherence.

You may also be interested in Lucene even if you do not need full text search. For many complex queries Lucene is showing better performance compared to built-in Coherence indexes. You can find performance comparison between embedded Lucene and Coherence indexes in  this article.

The Java Zone is brought to you in partnership with ZeroTurnaround. Check out this 8-step guide to see how you can increase your productivity by skipping slow application redeploys and by implementing application profiling, as you code!

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}