org.hibernate.search

## Class Search

- java.lang.Object
- - org.hibernate.search.Search

-     public final class Search
      extends Object

  Helper class to get a `FullTextSession` from a regular ORM session.
  Author:
    Emmanuel Bernard, Hardy Ferentschik

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static FullTextSession` | `getFullTextSession(Session session)` Creates a FullTextSession from a regular Session.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getFullTextSession

          public static FullTextSession getFullTextSession(Session session)

      Creates a FullTextSession from a regular Session. The created instance depends on the passed Session: closing either of them will close both instances. They both share the same persistence context.
      Parameters:
        `session` - the hibernate ORM session
      Returns:
        the new FullTextSession, based on the passed Session
      Throws:
        `IllegalArgumentException` - if passed null

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved