code: @SuppressWarnings("unchecked")
      public <T> List<Serializable> findId(Class<T> clazz, SearchParameters sp, List<SingularAttribute<?, ?>> availableProperties) {
          //log.info("Searching {} with terms : {} with available Properties: {}", new Object[]{clazz.getSimpleName(), sp.getTerms(), availableProperties});
          FullTextEntityManager fullTextEntityManager = getFullTextEntityManager(entityManager);
          Query query = sp.getLuceneQueryBuilder().build(fullTextEntityManager, sp, availableProperties);
  
          if (query == null) {
              return null;
          }
  
          FullTextQuery ftq = fullTextEntityManager.createFullTextQuery( //
                  query, clazz);
          ftq.setProjection("id");
          if (sp.getMaxResults() > 0) {
              ftq.setMaxResults(sp.getMaxResults());
          }
          List<Serializable> ids = newArrayList();
          List<Object[]> resultList = ftq.getResultList();
          for (Object[] result : resultList) {
              ids.add((Serializable) result[0]);
          }
          return ids;
      }
docs: /*
  Same as {@link #find(Class, SearchParameters, List)} but will return only the id