Skip to content

[Backport 8.0] Remove unsupported types and refactor namespaces #6756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration-jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
'8.1.3',
'8.2.3',
'8.3.3',
'8.4.2',
'8.4.3',
'8.5.0-SNAPSHOT',
'latest-8'
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class HandleNestTypesOnSourceJsonConverter : JsonConverter
//typeof(Attachment),
typeof(LazyJson),
//typeof(GeoCoordinate),
typeof(GeoLocation),
//typeof(GeoLocation),
//typeof(CartesianPoint),
};

Expand Down
1 change: 1 addition & 0 deletions src/Elastic.Clients.Elasticsearch/Api/BulkRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.IO;
using System.Collections.Generic;
using System.Linq;
using Elastic.Clients.Elasticsearch.Core.Bulk;

namespace Elastic.Clients.Elasticsearch
{
Expand Down
1 change: 1 addition & 0 deletions src/Elastic.Clients.Elasticsearch/Api/BulkResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Text.Json.Serialization;
using System.Text;
using System.Linq;
using Elastic.Clients.Elasticsearch.Core.Bulk;

namespace Elastic.Clients.Elasticsearch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.

namespace Elastic.Clients.Elasticsearch
namespace Elastic.Clients.Elasticsearch.Core.Bulk
{
public abstract partial class BulkResponseItemBase
{
Expand Down
2 changes: 1 addition & 1 deletion src/Elastic.Clients.Elasticsearch/Api/ScrollResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Elastic.Clients.Elasticsearch;
public partial class ScrollResponse<TDocument>
{
[JsonIgnore]
public IReadOnlyCollection<Hit<TDocument>> Hits => HitsMetadata.Hits;
public IReadOnlyCollection<Core.Search.Hit<TDocument>> Hits => HitsMetadata.Hits;

[JsonIgnore]
public IReadOnlyCollection<TDocument> Documents => HitsMetadata.Hits.Select(s => s.Source).ToReadOnlyCollection();
Expand Down
2 changes: 1 addition & 1 deletion src/Elastic.Clients.Elasticsearch/Api/SearchRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public SearchRequestDescriptor<TDocument> Index(Indices indices)
return Self;
}

public SearchRequestDescriptor<TDocument> Pit(string id, Action<PointInTimeReferenceDescriptor> configure)
public SearchRequestDescriptor<TDocument> Pit(string id, Action<Core.Search.PointInTimeReferenceDescriptor> configure)
{
PitValue = null;
PitDescriptorAction = null;
Expand Down
2 changes: 1 addition & 1 deletion src/Elastic.Clients.Elasticsearch/Api/SearchResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Elastic.Clients.Elasticsearch;
public partial class SearchResponse<TDocument>
{
[JsonIgnore]
public IReadOnlyCollection<Hit<TDocument>> Hits => HitsMetadata.Hits;
public IReadOnlyCollection<Core.Search.Hit<TDocument>> Hits => HitsMetadata.Hits;

[JsonIgnore]
public IReadOnlyCollection<TDocument> Documents => HitsMetadata.Hits.Select(s => s.Source).ToReadOnlyCollection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using System;
using System.Collections.Generic;
using System.Threading;
using Elastic.Clients.Elasticsearch;

namespace Elastic.Clients.Elasticsearch;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Elastic.Clients.Elasticsearch.Core.Bulk;

namespace Elastic.Clients.Elasticsearch;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Elastic.Transport.Diagnostics.Auditing;
using Elastic.Transport.Extensions;
using Elastic.Transport.Products.Elasticsearch;
using Elastic.Clients.Elasticsearch.Core.Bulk;

namespace Elastic.Clients.Elasticsearch;

Expand Down Expand Up @@ -176,7 +177,7 @@ private async Task<BulkAllResponse> BulkAsync(IList<T> buffer, long page, int ba
return await RetryDocumentsAsync(page, ++backOffRetries, retryableDocuments).ConfigureAwait(false);

if (retryableDocuments.Count > 0)
throw ThrowOnBadBulk(response, $"Bulk indexing failed and after retrying {backOffRetries} times");
throw ThrowOnBadBulk(response, $"Bulk indexing failed and after retrying {backOffRetries} times.");

request.BackPressure?.Release();

Expand Down
4 changes: 1 addition & 3 deletions src/Elastic.Clients.Elasticsearch/Helpers/BulkAllRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Collections.Generic;
using System.Text.Json;
using Elastic.Transport;
using Elastic.Clients.Elasticsearch.Core.Bulk;

namespace Elastic.Clients.Elasticsearch;

Expand Down Expand Up @@ -57,7 +58,6 @@ public BulkAllRequest(IEnumerable<T> documents)
RequestMetaData IHelperCallable.ParentMetaData { get => ParentMetaData; set => ParentMetaData = value; }
}


public sealed class BulkAllRequestDescriptor<T> : SerializableDescriptorBase<BulkAllRequestDescriptor<T>>, IBulkAllRequest<T>, IHelperCallable
{
private readonly IEnumerable<T> _documents;
Expand Down Expand Up @@ -150,5 +150,3 @@ public BulkAllRequestDescriptor<T> RetryDocumentPredicate(Func<BulkResponseItemB
// This descriptor is not serializable and gets converted to a BullAllObservable
protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings) => throw new NotImplementedException();
}


Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information.

using System.Collections.Generic;
using Elastic.Clients.Elasticsearch.Core.Bulk;

namespace Elastic.Clients.Elasticsearch;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using System;
using System.Collections.Generic;
using Elastic.Clients.Elasticsearch.Core.Bulk;

namespace Elastic.Clients.Elasticsearch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
using Elastic.Clients.Elasticsearch.Core.Get;
using Elastic.Clients.Elasticsearch.Core.MGet;

namespace Elastic.Clients.Elasticsearch
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ internal sealed class UnionConverter : JsonConverterFactory
// found.
private static readonly HashSet<Type> TypesToSkip = new()
{
typeof(SourceConfig),
typeof(Core.Search.SourceConfig),
typeof(Script)
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public partial class AsyncSearch<TDocument>
/// Shortcut to the hits returned for this search.
/// </summary>
[JsonIgnore]
public IReadOnlyCollection<Hit<TDocument>> Hits => HitsMetadata.Hits;
public IReadOnlyCollection<Core.Search.Hit<TDocument>> Hits => HitsMetadata.Hits;

/// <summary>
/// The source documents from the matching hits.
Expand Down
128 changes: 0 additions & 128 deletions src/Elastic.Clients.Elasticsearch/Types/Bulk/BulkCreateOperation.cs

This file was deleted.

This file was deleted.

Loading