title: What causes facet errors after Hibernate Search upgrade from version 4 to 5?
body: <p>Since upgrading (described below) the Facet search throws this exception.</p>
  <blockquote>
  <p>HSEARCH000268: Facet request 'groupArchiv' tries to facet on  field
  'facetfieldarchiv'  which either does not exists or is not configured
  for faceting (via @Facet). Check your configuration.</p>
  </blockquote>
  <p>Migrating from hibernate.search.version 4.4.4 to hibernate.search.version 5.5.2</p>
  <p>lucene-queryparser 5.3.1</p>
  <p>jdk 1.8xx</p>
  <p>All the Indexing is via a <code>ClassBridge</code>.</p>
  <p>The field <code>facetfieldarchiv</code> is in the index.</p>
  <p>All other searches are working fine.</p>
  <pre><code>protected List&lt;FacetBean&gt; searchFacets(String searchQuery, String defaultField, 
                                      String onField, String facetGroupName)
  {
       
      List&lt;FacetBean&gt; results = new ArrayList&lt;FacetBean&gt;();
      FullTextSession ftSession = getHibernateFulltextSession();
      org.apache.lucene.analysis.Analyzer analyzer = getAnalyzer(Archiv.class);
      QueryParser parser = new QueryParser(defaultField, analyzer);
      try
      {
  
          Query query = parser.parse(searchQuery);
          QueryBuilder builder = ftSession.getSearchFactory().buildQueryBuilder().forEntity(Item.class).get();
  
          FacetingRequest gruppeFacetingRequest = builder.facet()
                          .name(facetGroupName)
                          .onField(onField).discrete()
                          .orderedBy(FacetSortOrder.COUNT_DESC)
                          .includeZeroCounts(false)
                          .maxFacetCount(99999)
                          .createFacetingRequest();
  
          org.hibernate.search.FullTextQuery hibQuery = ftSession.createFullTextQuery(query, Item.class);
          FacetManager facetManager = hibQuery.getFacetManager();
          facetManager.enableFaceting(gruppeFacetingRequest);
          Iterator&lt;Facet&gt; itf1 = facetManager.getFacets(facetGroupName).iterator();
        
         **// The error occurs here,** 
  
  
          while (itf1.hasNext())
          {
  
              FacetBean bean = new FacetBean();
              Facet facetgruppe = itf1.next();
              bean.setFacetName(facetgruppe.getFacetingName());
              bean.setFacetFieldName(facetgruppe.getFieldName());
              bean.setFacetValue(facetgruppe.getValue());
              bean.setFacetCount(facetgruppe.getCount());
  
              results.add(bean);
          }
  
      } catch (Exception e)
      {
  
          logger.error(&quot; Fehler FacetSuche:   &quot; + e);
      }
      
      return results;
  }
  </code></pre>