private void processIndexes(QueryEntity qryEntity,TypeDescriptor d) throws IgniteCheckedException {
  if (!F.isEmpty(qryEntity.getIndexes())) {
    Map<String,String> aliases=qryEntity.getAliases();
    if (aliases == null)     aliases=Collections.emptyMap();
    for (    QueryIndex idx : qryEntity.getIndexes()) {
      String idxName=idx.getName();
      if (idxName == null)       idxName=QueryEntity.defaultIndexName(idx);
      if (idx.getIndexType() == QueryIndexType.SORTED || idx.getIndexType() == QueryIndexType.GEOSPATIAL) {
        d.addIndex(idxName,idx.getIndexType() == QueryIndexType.SORTED ? SORTED : GEO_SPATIAL);
        int i=0;
        for (        Map.Entry<String,Boolean> entry : idx.getFields().entrySet()) {
          String field=entry.getKey();
          boolean asc=entry.getValue();
          String alias=aliases.get(field);
          if (alias != null)           field=alias;
          d.addFieldToIndex(idxName,field,i++,!asc);
        }
      }
 else {
        assert idx.getIndexType() == QueryIndexType.FULLTEXT;
        for (        String field : idx.getFields().keySet()) {
          String alias=aliases.get(field);
          if (alias != null)           field=alias;
          d.addFieldToTextIndex(field);
        }
      }
    }
  }
}

private void processIndexes ( QueryEntity qryEntity , TypeDescriptor d ) throws IgniteCheckedException { if ( ! F . isEmpty ( qryEntity . getIndexes ( ) ) ) { Map < String , String > aliases = qryEntity . getAliases ( ) ; if ( aliases == null ) aliases = Collections . emptyMap ( ) ; for ( QueryIndex idx : qryEntity . getIndexes ( ) ) { String idxName = idx . getName ( ) ; if ( idxName == null ) idxName = QueryEntity . defaultIndexName ( idx ) ; if ( idx . getIndexType ( ) == QueryIndexType . SORTED || idx . getIndexType ( ) == QueryIndexType . GEOSPATIAL ) { d . addIndex ( idxName , idx . getIndexType ( ) == QueryIndexType . SORTED ? SORTED : GEO_SPATIAL ) ; int i = 0 ; for ( Map . Entry < String , Boolean > entry : idx . getFields ( ) . entrySet ( ) ) { String field = entry . getKey ( ) ; boolean asc = entry . getValue ( ) ; String alias = aliases . get ( field ) ; if ( alias != null ) field = alias ; d . addFieldToIndex ( idxName , field , i ++ , ! asc ) ; } } else { assert idx . getIndexType ( ) == QueryIndexType . FULLTEXT ; for ( String field : idx . getFields ( ) . keySet ( ) ) { String alias = aliases . get ( field ) ; if ( alias != null ) field = alias ; d . addFieldToTextIndex ( field ) ; } } } } }
processes indexes based on query entity .
