1 / 23

Matt Honeycutt @matthoneycutt Adding powerful search capabilities to your application with Lucene.NET and NHibernate Sea

Matt Honeycutt @matthoneycutt Adding powerful search capabilities to your application with Lucene.NET and NHibernate Search. What should we do? . Our application. Something completely revolutionary!. Solution Overview. NHibernate Primer. Object-relational mapper

avongara
Download Presentation

Matt Honeycutt @matthoneycutt Adding powerful search capabilities to your application with Lucene.NET and NHibernate Sea

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Matt Honeycutt @matthoneycutt Adding powerful search capabilities to your application with Lucene.NET and NHibernate Search

  2. What should we do?

  3. Our application Something completely revolutionary!

  4. Solution Overview

  5. NHibernate Primer • Object-relational mapper • “Use it whenever you need to access a relational database” – Oren “Ayende” Eini

  6. NHibernate Primer • Object-relational mapper • “Use it whenever you need to access a relational database” – Oren “Ayende” Eini <hibernate-mapping package="org.hibernate.tutorial.domain"> <class name="Event" table="EVENTS"> <id name="id" column="EVENT_ID"> <generator class="native"/> </id> <property name="date" type="timestamp" column="EVENT_DATE"/> <property name="title"/> </class> </hibernate-mapping> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > </hibernate-configuration> <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> <class name="Cat" table="Cat"> <id name="Id"> <generator class="identity" /> </id> <property name="Name"> <column name="Name" length="16" not-null="true" /> </property> <property name="Sex" /> <many-to-one name="Mate" /> <bag name="Kittens"> <key column="mother_id" /> <one-to-many class="Cat" /> </bag> </class> <property name="connection.connection_string">Server=(local);Initial Catalog=dbname;User Id=user;Password=********</property> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>

  7. NHibernate Primer • Object-relational mapper • “Use it whenever you need to access a relational database” – Oren “Ayende” Eini Just say NO to XML configuration!

  8. Configuring NHibernate using Fluent NHibernate

  9. What’s the problem? “As a user, I want to be able to find interesting blog posts by specifying one or more keywords I’m interested in. The blog should display a list of blog posts sorted by relevance.”

  10. How can we add search capabilities?

  11. I don’t know if I LIKE this…

  12. SQL Server Full-text indexing

  13. What’s about this “Lucene” thing?

  14. Lucene Overview ? Searching Indexing Query Parser Document Index Searcher Analyzer Index Reader Index Writer Directory (Index)

  15. Indexing and Searching with Lucene.NET

  16. That’s a lot of code, isn’t there an easier way?

  17. NHibernate.Search - Indexing SQL Database NHibernate Entity Add Update Delete Post-Insert Post-Update Post-Delete NHibernate.Search Lucene.NET Directory

  18. NHibernate.Search - Querying IFullTextSession ISession ISession NHibernate Lucene.NET SQL Database Directory

  19. Configuring NHibernate.Search

  20. Using NHibernate.Search

  21. So what’s left?

  22. For more information… • Custom Mapping for NHibernate.Search: http://tiny.cc/kmmkg • NHibernate.Search using Lucene.NET Full Text Index - http://tiny.cc/dvb4d • Hibernate Search In Action

  23. Thanks! Follow me: Blog: http://trycatchfail.com Twitter: matthoneycutt

More Related