Over a million developers have joined DZone.

Search Oracle Coherence grid with Lucene

DZone's Guide to

Search Oracle Coherence grid with Lucene

· Java Zone ·
Free Resource

Verify, standardize, and correct the Big 4 + more– name, email, phone and global addresses – try our Data Quality APIs now at Melissa Developer Portal!

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.

Developers! Quickly and easily gain access to the tools and information you need! Explore, test and combine our data quality APIs at Melissa Developer Portal – home to tools that save time and boost revenue. 


Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}