code: @Override
      public Map<String, Object> search(KunderaMetadata kunderaMetadata, KunderaQuery kunderaQuery,
              PersistenceDelegator persistenceDelegator, EntityMetadata m, int firstResult, int maxResults)
      {
          ESQuery query = new ESQuery<>(kunderaQuery, persistenceDelegator, kunderaMetadata);
          MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata()
                  .getMetamodel(m.getPersistenceUnit());
          Expression whereExpression = KunderaQueryUtils.getWhereClause(kunderaQuery.getJpqlExpression());
  
          QueryBuilder filter = whereExpression != null ? query.getEsFilterBuilder()
                  .populateFilterBuilder(((WhereClause) whereExpression).getConditionalExpression(), m) : null;
  
          FilteredQueryBuilder queryBuilder = QueryBuilders.filteredQuery(null, filter);
          SearchResponse response = getSearchResponse(kunderaQuery, queryBuilder, filter, query, m, firstResult,
                  maxResults, kunderaMetadata);
  
          return buildResultMap(response, kunderaQuery, m, metaModel);
      }
docs: /*
  (non-Javadoc)
  
  @see
  com.impetus.kundera.index.Indexer#search(com.impetus.kundera.persistence
  .EntityManagerFactoryImpl.KunderaMetadata,
  com.impetus.kundera.query.KunderaQuery,
  com.impetus.kundera.persistence.PersistenceDelegator,
  com.impetus.kundera.metadata.model.EntityMetadata)