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

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

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.

Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

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

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}