本文整理汇总了C#中Aerospike.Client.AerospikeClient.DropIndex方法的典型用法代码示例。如果您正苦于以下问题:C# AerospikeClient.DropIndex方法的具体用法?C# AerospikeClient.DropIndex怎么用?C# AerospikeClient.DropIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aerospike.Client.AerospikeClient
的用法示例。
在下文中一共展示了AerospikeClient.DropIndex方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RunExample
/// <summary>
/// Query on a secondary index with a filter and then apply an additional filter in the
/// user defined function.
/// </summary>
public override void RunExample(AerospikeClient client, Arguments args)
{
if (!args.hasUdf)
{
console.Info("Query functions are not supported by the connected Aerospike server.");
return;
}
string indexName = "profileindex";
string keyPrefix = "profilekey";
string binName = args.GetBinName("name");
Register(client, args);
CreateIndex(client, args, indexName, binName);
WriteRecords(client, args, keyPrefix, binName);
RunQuery(client, args, indexName, binName);
client.DropIndex(args.policy, args.ns, args.set, indexName);
}
示例2: RunExample
/// <summary>
/// Geospatial query examples.
/// </summary>
public override void RunExample(AerospikeClient client, Arguments args)
{
if (!args.hasGeo)
{
console.Info("Geospatial functions are not supported by the connected Aerospike server.");
return;
}
string indexName = "queryindexloc";
string keyPrefix = "querykeyloc";
string binName = args.GetBinName("querybinloc");
int size = 20;
CreateIndex(client, args, indexName, binName);
WriteRecords(client, args, keyPrefix, binName, size);
RunQuery(client, args, indexName, binName);
RunRadiusQuery(client, args, indexName, binName);
client.DropIndex(args.policy, args.ns, args.set, indexName);
}
示例3: RunExample
/// <summary>
/// Apply user defined function on records that match the query filter.
/// </summary>
public override void RunExample(AerospikeClient client, Arguments args)
{
if (!args.hasUdf)
{
console.Info("Query functions are not supported by the connected Aerospike server.");
return;
}
string indexName = "qeindex1";
string keyPrefix = "qekey";
string binName1 = args.GetBinName("qebin1");
string binName2 = args.GetBinName("qebin2");
int size = 10;
Register(client, args);
CreateIndex(client, args, indexName, binName1);
WriteRecords(client, args, keyPrefix, binName1, binName2, size);
RunQueryExecute(client, args, indexName, binName1, binName2);
ValidateRecords(client, args, indexName, binName1, binName2, size);
client.DropIndex(args.policy, args.ns, args.set, indexName);
}
示例4: RunMapKeyExample
private void RunMapKeyExample(AerospikeClient client, Arguments args)
{
string indexName = "geo_mapkey";
string keyPrefix = "mapkey";
string mapValuePrefix = "mk";
string binName = "geo_mkey_bin";
string binName2 = "geo_uniq_bin";
int size = 1000;
// create collection index on mapKey
CreateIndex(client, args, IndexCollectionType.MAPKEYS, indexName, binName);
WriteMapKeyRecords(client, args, keyPrefix, binName, binName2, mapValuePrefix, size);
RunQuery(client, args, binName, binName2, IndexCollectionType.MAPKEYS);
client.DropIndex(args.policy, args.ns, args.set, indexName);
DeleteRecords(client,args, keyPrefix, size);
}
示例5: RunListExample
private void RunListExample(AerospikeClient client, Arguments args)
{
string indexName = "geo_list";
string keyPrefix = "list";
string binName = "geo_list_bin";
string binName2 = "geo_uniq_bin";
int size = 1000;
// create collection index on list
CreateIndex(client, args, IndexCollectionType.LIST, indexName, binName);
WriteListRecords(client, args, keyPrefix, binName, binName2, size);
RunQuery(client, args, binName, binName2, IndexCollectionType.LIST);
client.DropIndex(args.policy, args.ns, args.set, indexName);
DeleteRecords(client, args, keyPrefix, size);
}