Ejemplo n.º 1
0
 internal SuggestResponse(ShardsMetaData metaData, IDictionary <string, object> dict)
 {
     this.Shards      = metaData;
     this.Suggestions = dict
                        .Select(kv => new { k = kv.Key, v = kv.Value as Suggest <T>[] })
                        .Where(kv => kv.v != null)
                        .ToDictionary(kv => kv.k, kv => kv.v);
 }
Ejemplo n.º 2
0
 public override IResponse RefreshFromConnection(ElasticClient cli)
 {
     var health = cli.Stats();
     if (health.IsValid && health.OK)
     {
         GlobalStats = health.Stats;
         ShardsMetaData = health.Shards;
         Indices = health.Indices;
     }
     return health;
 }
Ejemplo n.º 3
0
 internal SuggestResponse(ShardsMetaData metaData, IDictionary <string, object> dict)
 {
     this.Shards = metaData;
     if (dict == null)
     {
         return;
     }
     this.Suggestions = dict
                        .Select(kv => new { k = kv.Key, v = kv.Value as Suggest <T>[] })
                        .Where(kv => kv.v != null)
                        .ToDictionary(kv => kv.k, kv => (IReadOnlyCollection <Suggest <T> >)kv.v);
 }