コード例 #1
0
 protected override void IntegrationSetup(IElasticClient client, CallUniqueValues values)
 {
     foreach (var index in values.Values)
     {
         client.CreateIndex(index);
         client.ClusterHealth(h => h.WaitForStatus(WaitForStatus.Yellow).Index(index));
         client.CloseIndex(index);
     }
 }
コード例 #2
0
 protected override void BeforeAllCalls(IElasticClient client, IDictionary <ClientMethod, string> values)
 {
     foreach (var index in values.Values)
     {
         client.CreateIndex(index);
         client.ClusterHealth(h => h.WaitForStatus(WaitForStatus.Yellow));
         client.CloseIndex(index);
     }
 }
コード例 #3
0
 /// <summary>
 /// The open and close index APIs allow to close an index, and later on opening it.
 /// A closed index has almost no overhead on the cluster (except for maintaining its metadata), and is blocked
 /// for read/write operations.
 /// A closed index can be opened which will then go through the normal recovery process.
 /// <para> </para>>http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-open-close.html
 /// </summary>
 /// <typeparam name="T">The type used to infer the index name to be closed</typeparam>
 /// <param name="client"></param>
 public static IIndicesOperationResponse CloseIndex <T>(this IElasticClient client)
     where T : class
 {
     return(client.CloseIndex(f => f.Index <T>()));
 }
コード例 #4
0
 /// <summary>
 /// The open and close index APIs allow to close an index, and later on opening it.
 /// A closed index has almost no overhead on the cluster (except for maintaining its metadata), and is blocked
 /// for read/write operations.
 /// A closed index can be opened which will then go through the normal recovery process.
 /// <para> </para>>http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-open-close.html
 /// </summary>
 /// <param name="client"></param>
 /// <param name="index">The name of the index to be closed</param>
 public static IIndicesOperationResponse CloseIndex(this IElasticClient client, string index)
 {
     return(client.CloseIndex(f => f.Index(index)));
 }