-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Elasticsearch 7.2.0 introduced a change to empty filters handling in elastic/elasticsearch#41459 (cherry picked from commit a8e502f)
- Loading branch information
Showing
7 changed files
with
185 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
docs/aggregations/bucket/geo-hash-tile/geo-tile-grid-aggregation-usage.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
:ref_current: https://www.elastic.co/guide/en/elasticsearch/reference/7.0 | ||
|
||
:github: https://github.com/elastic/elasticsearch-net | ||
|
||
:nuget: https://www.nuget.org/packages | ||
|
||
//// | ||
IMPORTANT NOTE | ||
============== | ||
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/master/src/Tests/Tests/Aggregations/Bucket/GeoHashTile/GeoTileGridAggregationUsageTests.cs. | ||
If you wish to submit a PR for any spelling mistakes, typos or grammatical errors for this file, | ||
please modify the original csharp file found at the link and submit the PR with that change. Thanks! | ||
//// | ||
|
||
[[geo-tile-grid-aggregation-usage]] | ||
=== Geo Tile Grid Aggregation Usage | ||
|
||
==== Fluent DSL example | ||
|
||
[source,csharp] | ||
---- | ||
a => a | ||
.GeoTile("my_geotile", g => g | ||
.Field(p => p.LocationPoint) | ||
.Precision(GeoTilePrecision.Precision3) | ||
.Size(1000) | ||
.ShardSize(100) | ||
) | ||
---- | ||
|
||
==== Object Initializer syntax example | ||
|
||
[source,csharp] | ||
---- | ||
new GeoTileGridAggregation("my_geotile") | ||
{ | ||
Field = Field<Project>(p => p.LocationPoint), | ||
Precision = GeoTilePrecision.Precision3, | ||
Size = 1000, | ||
ShardSize = 100 | ||
} | ||
---- | ||
|
||
[source,javascript] | ||
.Example json output | ||
---- | ||
{ | ||
"my_geotile": { | ||
"geotile_grid": { | ||
"field": "locationPoint", | ||
"precision": 3, | ||
"size": 1000, | ||
"shard_size": 100 | ||
} | ||
} | ||
} | ||
---- | ||
|
||
==== Handling Responses | ||
|
||
[source,csharp] | ||
---- | ||
response.ShouldBeValid(); | ||
var myGeoTileTile = response.Aggregations.GeoTile("my_geotile"); | ||
myGeoTileTile.Should().NotBeNull(); | ||
myGeoTileTile.Buckets.FirstOrDefault(r => r.Key == "3/0/4").Should().NotBeNull(); | ||
myGeoTileTile.Buckets.FirstOrDefault(r => r.Key == "3/5/5").Should().NotBeNull(); | ||
---- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
docs/x-pack/security/api-key/security-api-key-usage.asciidoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
:ref_current: https://www.elastic.co/guide/en/elasticsearch/reference/7.0 | ||
|
||
:github: https://github.com/elastic/elasticsearch-net | ||
|
||
:nuget: https://www.nuget.org/packages | ||
|
||
//// | ||
IMPORTANT NOTE | ||
============== | ||
This file has been generated from https://github.com/elastic/elasticsearch-net/tree/master/src/Tests/Tests/XPack/Security/ApiKey/SecurityApiKeyUsageTests.cs. | ||
If you wish to submit a PR for any spelling mistakes, typos or grammatical errors for this file, | ||
please modify the original csharp file found at the link and submit the PR with that change. Thanks! | ||
//// | ||
|
||
[[security-api-key-usage]] | ||
=== Security Api Key Usage | ||
|
||
==== Fluent DSL example | ||
|
||
[source,csharp] | ||
---- | ||
TryGetExtendedValue<CreateApiKeyResponse>("response", out var response); | ||
// Unit tests for HitsTheCorrectUrl will have a null response object. | ||
if (response == null) | ||
return d => d; | ||
return d => d.RequestConfiguration(r => r.ApiKeyAuthentication(response.Id, response.ApiKey)); | ||
---- | ||
|
||
==== Object Initializer syntax example | ||
|
||
[source,csharp] | ||
---- | ||
TryGetExtendedValue<CreateApiKeyResponse>("response", out var response); | ||
// Unit tests for HitsTheCorrectUrl will have a null response object. | ||
if (response == null) | ||
return new NodesInfoRequest(); | ||
return new NodesInfoRequest | ||
{ | ||
RequestConfiguration = new RequestConfiguration | ||
{ | ||
ApiKeyAuthenticationCredentials = new ApiKeyAuthenticationCredentials(response.Id, response.ApiKey) | ||
} | ||
}; | ||
---- | ||
|
||
==== Handling Responses | ||
|
||
[source,csharp] | ||
---- | ||
response.IsValid.Should().BeTrue(); | ||
response.Nodes.Should().NotBeEmpty(); | ||
---- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters