code: @Override
      public List<Object> findByRelation(String colName, Object colValue, Class entityClazz)
      {
          GetResponse get = null;
  
          List results = new ArrayList();
  
          EntityMetadata metadata = KunderaMetadataManager.getEntityMetadata(kunderaMetadata, entityClazz);
  
          try
          {
              SearchResponse response = txClient
                      .prepareSearch(metadata.getSchema()
                              .toLowerCase())/*
                                              * . addFields ( "*" )
                                              */
                      .setTypes(metadata.getTableName()).setQuery(QueryBuilders.termQuery(colName, colValue)).execute()
                      .get();
  
              SearchHits hits = response.getHits();
              for (SearchHit hit : hits)
              {
                  MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata()
                          .getMetamodel(metadata.getPersistenceUnit());
  
                  EntityType entityType = metaModel.entity(entityClazz);
                  Map<String, Object> searchResults = hit.getSource();
                  // hit
                  Object result = null;
                  result = KunderaCoreUtils.createNewInstance(entityClazz);
                  result = esResponseReader.wrapFindResult(searchResults, entityType, result, metadata, false);
                  if (result != null)
                  {
                      results.add(result);
                  }
              }
          }
          catch (InterruptedException iex)
          {
              logger.error("Error while find record of {}, Caused by :.", entityClazz.getSimpleName(), iex);
              throw new PersistenceException(iex);
          }
          catch (ExecutionException eex)
          {
              logger.error("Error while find record of {}, Caused by :.", entityClazz.getSimpleName(), eex);
              throw new PersistenceException(eex);
          }
  
          return results;
      }
docs: /*
  (non-Javadoc)
  
  @see com.impetus.kundera.client.Client#findByRelation(java.lang.String,
  java.lang.Object, java.lang.Class)