anchor.diff:      void onStart(@Observes StartupEvent ev) throws InterruptedException { // <2>
           // only reindex if we imported some content
           if (Book.count() > 0) {
  -            Search.session(em)
  -                    .massIndexer()
  +            searchSession.massIndexer()
                       .startAndWait();
           }
       }
  
positive.code: 
  == Adding full text capabilities to our REST service
  
  In our existing `LibraryResource`, we just need to inject the following methods (and add a few ``import``s):
  
  [source,java]
  ----
  
negative.code: the mass indexer should then only be used when you change your indexing configuration (adding a new field, changing an analyzer's configuration...) and you want the new configuration to be applied to your existing entities.
  <3> This is where the magic begins: just adding the annotations to our entities makes them available for full text search: we can now query the index using the Hibernate Search DSL.
  <4> Use the `org.jboss.resteasy.annotations.jaxrs.QueryParam` annotation type to avoid repeating the parameter name.
  <5> We indicate that we are searching for ``Author``s.
  <6> We create a predicate: if the pattern is empty, we use a `matchAll()` predicate.
  <7> If we have a valid pattern, we create a https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-simple-query-string-query.html[`simpleQueryString()`] predicate on the `firstName`, `lastName` and `books.title` fields matching our pattern.
  <8> We define the sort order of our results. Here we sort by last name, then by first name. Note that we use the specific fields we created for sorting.
  <9> Fetch the `size` top hits, `20` by default. Obviously, paging is also supported.
  
  [NOTE]
  ====
  