本文整理汇总了C#中ISearchResponse类的典型用法代码示例。如果您正苦于以下问题:C# ISearchResponse类的具体用法?C# ISearchResponse怎么用?C# ISearchResponse使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISearchResponse类属于命名空间,在下文中一共展示了ISearchResponse类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.ShouldBeValid();
var sigNames = response.Aggs.SignificantTerms("significant_names");
sigNames.Should().NotBeNull();
sigNames.DocCount.Should().BeGreaterThan(0);
}
开发者ID:niemyjski,项目名称:elasticsearch-net,代码行数:7,代码来源:SignificantTermsAggregationUsageTests.cs
示例2: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeTrue();
var commitsSum = response.Aggs.Sum("commits_sum");
commitsSum.Should().NotBeNull();
commitsSum.Value.Should().BeGreaterThan(0);
}
开发者ID:michaelbudnik,项目名称:elasticsearch-net,代码行数:7,代码来源:SumAggregationUsageTests.cs
示例3: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
/** === Handling Responses
* Using the `.Agg` aggregation helper we can fetch our aggregation results easily
* in the correct type. <<aggs-vs-aggregations, Be sure to read more about .Aggs vs .Aggregations>>
*/
response.IsValid.Should().BeTrue();
var filterAgg = response.Aggs.Filters("projects_by_state");
filterAgg.Should().NotBeNull();
var namedResult = filterAgg.NamedBucket("belly_up");
namedResult.Should().NotBeNull();
namedResult.DocCount.Should().BeGreaterThan(0);
namedResult = filterAgg.NamedBucket("stable");
namedResult.Should().NotBeNull();
namedResult.DocCount.Should().BeGreaterThan(0);
namedResult = filterAgg.NamedBucket("very_active");
namedResult.Should().NotBeNull();
namedResult.DocCount.Should().BeGreaterThan(0);
namedResult = filterAgg.NamedBucket("other_states_of_being");
namedResult.Should().NotBeNull();
namedResult.DocCount.Should().Be(0);
}
开发者ID:RossLieberman,项目名称:NEST,代码行数:27,代码来源:FiltersAggregationUsageTests.cs
示例4: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeTrue();
var min = response.Aggs.Max("min_commits");
min.Should().NotBeNull();
min.Value.Should().BeGreaterThan(0);
}
开发者ID:emohebi,项目名称:elasticsearch-net,代码行数:7,代码来源:MinAggregationUsageTests.cs
示例5: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.ShouldBeValid();
var max = response.Aggs.Max("max_commits");
max.Should().NotBeNull();
max.Value.Should().BeGreaterThan(0);
}
开发者ID:niemyjski,项目名称:elasticsearch-net,代码行数:7,代码来源:MaxAggregationUsageTests.cs
示例6: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeTrue();
var commitsAvg = response.Aggs.Average("average_commits");
commitsAvg.Should().NotBeNull();
commitsAvg.Value.Should().BeGreaterThan(0);
}
开发者ID:emohebi,项目名称:elasticsearch-net,代码行数:7,代码来源:AverageAggregationUsageTests.cs
示例7: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeTrue();
var commitCount = response.Aggs.ValueCount("commit_count");
commitCount.Should().NotBeNull();
commitCount.Value.Should().BeGreaterThan(0);
}
开发者ID:emohebi,项目名称:elasticsearch-net,代码行数:7,代码来源:ValueCountAggregationUsageTests.cs
示例8: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeTrue();
var projectCount = response.Aggs.Cardinality("state_count");
projectCount.Should().NotBeNull();
projectCount.Value.Should().Be(3);
}
开发者ID:RossLieberman,项目名称:NEST,代码行数:7,代码来源:CardinalityAggregationUsageTests.cs
示例9: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.ShouldBeValid();
var sumTheHardWay = response.Aggs.ScriptedMetric("sum_the_hard_way");
sumTheHardWay.Should().NotBeNull();
sumTheHardWay.Value<int>().Should().BeGreaterThan(0);
}
开发者ID:niemyjski,项目名称:elasticsearch-net,代码行数:7,代码来源:ScriptedMetricAggregationUsageTests.cs
示例10: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.ShouldBeValid();
var min = response.Aggs.Min("min_last_activity");
min.Should().NotBeNull();
min.Value.Should().BeGreaterThan(0);
min.ValueAsString.Should().NotBeNullOrEmpty();
}
开发者ID:niemyjski,项目名称:elasticsearch-net,代码行数:8,代码来源:MinAggregationUsageTests.cs
示例11: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeTrue();
var commits = response.Aggs.Histogram("commits");
commits.Should().NotBeNull();
foreach (var item in commits.Items)
item.DocCount.Should().BeGreaterThan(0);
}
开发者ID:michaelbudnik,项目名称:elasticsearch-net,代码行数:8,代码来源:HistogramAggregationUsageTests.cs
示例12: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeTrue();
var allProjects = response.Aggs.Global("all_projects");
allProjects.Should().NotBeNull();
var names = allProjects.Terms("names");
names.Should().NotBeNull();
}
开发者ID:c1sc0,项目名称:elasticsearch-net,代码行数:8,代码来源:GlobalAggregationUsageTests.cs
示例13: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.ShouldBeValid();
var commitsAvg = response.Aggs.Average("average_commits");
commitsAvg.Should().NotBeNull();
commitsAvg.Value.Should().BeGreaterThan(0);
commitsAvg.Meta.Should().NotBeNull().And.HaveCount(1);
commitsAvg.Meta["foo"].Should().Be("bar");
}
开发者ID:niemyjski,项目名称:elasticsearch-net,代码行数:9,代码来源:AverageAggregationUsageTests.cs
示例14: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeTrue();
var ringsAroundAmsterdam = response.Aggs.GeoDistance("rings_around_amsterdam");
ringsAroundAmsterdam.Should().NotBeNull();
ringsAroundAmsterdam.Items.Where(r => r.Key == "*-100.0").FirstOrDefault().Should().NotBeNull();
ringsAroundAmsterdam.Items.Where(r => r.Key == "100.0-300.0").FirstOrDefault().Should().NotBeNull();
ringsAroundAmsterdam.Items.Where(r => r.Key == "300.0-*").FirstOrDefault().Should().NotBeNull();
}
开发者ID:emohebi,项目名称:elasticsearch-net,代码行数:9,代码来源:GeoDistanceAggregationUsageTests.cs
示例15: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.ShouldBeValid();
var commitsOutlier = response.Aggs.PercentileRanks("commits_outlier");
commitsOutlier.Should().NotBeNull();
commitsOutlier.Items.Should().NotBeNullOrEmpty();
foreach (var item in commitsOutlier.Items)
item.Should().NotBeNull();
}
开发者ID:niemyjski,项目名称:elasticsearch-net,代码行数:9,代码来源:PercentileRanksAggregationUsageTests.cs
示例16: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.ShouldBeValid();
var sample = response.Aggs.Sampler("sample");
sample.Should().NotBeNull();
var sigTags = sample.SignificantTerms("significant_names");
sigTags.Should().NotBeNull();
}
开发者ID:niemyjski,项目名称:elasticsearch-net,代码行数:9,代码来源:SamplerAggregationUsageTests.cs
示例17: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeTrue();
var commitsOutlier = response.Aggs.Percentiles("commits_outlier");
commitsOutlier.Should().NotBeNull();
commitsOutlier.Items.Should().NotBeNullOrEmpty();
foreach (var item in commitsOutlier.Items)
item.Value.Should().BeGreaterThan(0);
}
开发者ID:michaelbudnik,项目名称:elasticsearch-net,代码行数:9,代码来源:PercentilesAggregationUsageTests.cs
示例18: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeTrue();
var ipRanges = response.Aggs.IpRange("ip_ranges");
ipRanges.Should().NotBeNull();
ipRanges.Buckets.Should().NotBeNull();
ipRanges.Buckets.Count.Should().BeGreaterThan(0);
foreach (var range in ipRanges.Buckets)
range.DocCount.Should().BeGreaterThan(0);
}
开发者ID:jeroenheijmans,项目名称:elasticsearch-net,代码行数:10,代码来源:IpRangeAggregationUsageTests.cs
示例19: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeFalse();
var serverError = response.ServerError;
serverError.Should().NotBeNull();
serverError.Status.Should().Be(400);
serverError.Error.Reason.Should().Be("all shards failed");
serverError.Error.RootCause.First().Reason.Should().Contain("[-1m]");
}
开发者ID:niemyjski,项目名称:elasticsearch-net,代码行数:10,代码来源:InvalidSearchApiTests.cs
示例20: ExpectResponse
protected override void ExpectResponse(ISearchResponse<Project> response)
{
response.IsValid.Should().BeTrue();
var centroid = response.Aggs.GeoCentroid("centroid");
centroid.Should().NotBeNull();
centroid.Location.Should().NotBeNull();
centroid.Location.Latitude.Should().NotBe(0);
centroid.Location.Longitude.Should().NotBe(0);
}
开发者ID:c1sc0,项目名称:elasticsearch-net,代码行数:10,代码来源:GeoCentroidAggregationUsageTests.cs
注:本文中的ISearchResponse类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论