O'Reilly logo

NHibernate 4.x Cookbook - Second Edition by Jason Dentler, Alexander Zaytsev, Gunnar Liljas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up full-text searches

While many relational databases provide some mechanism for full-text searches, these databases are optimized for Online Transaction Processing (OLTP) type workloads. Full-text search engines, on the other hand, are designed specifically for text queries, and excel at them. In this recipe, we'll show you how to use NHibernate search and Lucene.Net to provide full-text search capabilities to your applications.

Getting ready

Complete the Eg.Core model and mappings from Chapter 1, The Configuration and Schema.

How to do it…

  1. Install the NHibernate Search package the to Eg.Core project using NuGet Package Manager Console by running the following command:
    Install-Package NHibernate.Search
    
  2. In the Entity base class, decorate the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required