Exemplo n.º 1
0
            public override ElasticResponse RefreshFromConnection(SearchClient cli)
            {
                var rawState = cli.GetClusterState();
                if (rawState.HasData)
                {
                    var state = rawState.Data;
                    ClusterName = state.ClusterName;
                    MasterNode = state.MasterNode;
                    Nodes = state.Nodes;
                    RoutingNodes = state.RoutingNodes;
                    if (state.RoutingTable != null)
                        RoutingIndices = state.RoutingTable.Indices;
                }

                return rawState;
            }
Exemplo n.º 2
0
            public override ElasticResponse RefreshFromConnection(SearchClient cli)
            {
                var rawState = cli.GetClusterState();

                if (rawState.HasData)
                {
                    var state = rawState.Data;
                    ClusterName  = state.ClusterName;
                    MasterNode   = state.MasterNode;
                    Nodes        = state.Nodes;
                    RoutingNodes = state.RoutingNodes;
                    if (state.RoutingTable != null)
                    {
                        RoutingIndices = state.RoutingTable.Indices;
                    }
                }

                return(rawState);
            }