public BaseMultiIndexContainsQuery(BaseMultiIndexContainsQuery <TQueryResult> query)
 {
     Init(query.IndexIdList,
          query.IndexItemList,
          query.TargetIndexName,
          query.ExcludeData,
          query.GetIndexHeader,
          query.PrimaryIdList,
          query.Filter,
          query.FullDataIdInfo,
          query.Count,
          query.IndexCondition,
          query.DomainSpecificProcessingType);
 }
        public List <IPrimaryRelayMessageQuery> SplitQuery(int numClustersInGroup)
        {
            BaseMultiIndexContainsQuery <TQueryResult> multiIndexContainsQuery;
            List <IPrimaryRelayMessageQuery>           queryList = new List <IPrimaryRelayMessageQuery>();
            Dictionary <int, Triple <List <byte[]>, List <int>, Dictionary <byte[], MultiIndexContainsQueryParams> > > clusterParamsMapping;

            IndexCacheUtils.SplitIndexIdsByCluster(IndexIdList, PrimaryIdList, MultiIndexContainsQueryParamsMapping, numClustersInGroup, out clusterParamsMapping);

            foreach (KeyValuePair <int, Triple <List <byte[]>, List <int>, Dictionary <byte[], MultiIndexContainsQueryParams> > > clusterParam in clusterParamsMapping)
            {
                multiIndexContainsQuery = new BaseMultiIndexContainsQuery <TQueryResult>(this)
                {
                    PrimaryId     = clusterParam.Key,
                    IndexIdList   = clusterParam.Value.First,
                    PrimaryIdList = clusterParam.Value.Second,
                    MultiIndexContainsQueryParamsMapping = clusterParam.Value.Third
                };
                queryList.Add(multiIndexContainsQuery);
            }
            return(queryList);
        }