Skip to content

Commit 8c04396

Browse files
[Search] Rename HighWaterMark to the more generic ChangeTrackingState (Azure#24732)
* Rename HighWaterMark to the more generic ChangeTrackingState * Update Changelog * Rename properties in `IndexerChangeTrackingState` * Rename parameters in `ModelFactory` class
1 parent 5a7607f commit 8c04396

File tree

6 files changed

+87
-88
lines changed

6 files changed

+87
-88
lines changed

sdk/search/Azure.Search.Documents/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
### Features Added
66

77
### Breaking Changes
8+
- Renamed `IndexerStateHighWaterMark` to `IndexerChangeTrackingState`.
9+
- Renamed the property `HighWaterMark` to `ChangeTrackingState` in `IndexerState`.
810

911
### Bugs Fixed
1012

sdk/search/Azure.Search.Documents/api/Azure.Search.Documents.netstandard2.0.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,14 @@ public ImageAnalysisSkill(System.Collections.Generic.IEnumerable<Azure.Search.Do
819819
public static bool operator !=(Azure.Search.Documents.Indexes.Models.ImageDetail left, Azure.Search.Documents.Indexes.Models.ImageDetail right) { throw null; }
820820
public override string ToString() { throw null; }
821821
}
822+
public partial class IndexerChangeTrackingState
823+
{
824+
internal IndexerChangeTrackingState() { }
825+
public string AllDocumentsFinalState { get { throw null; } }
826+
public string AllDocumentsInitialState { get { throw null; } }
827+
public string ResetDocumentsFinalState { get { throw null; } }
828+
public string ResetDocumentsInitialState { get { throw null; } }
829+
}
822830
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
823831
public readonly partial struct IndexerExecutionEnvironment : System.IEquatable<Azure.Search.Documents.Indexes.Models.IndexerExecutionEnvironment>
824832
{
@@ -880,19 +888,11 @@ public enum IndexerExecutionStatus
880888
public partial class IndexerState
881889
{
882890
internal IndexerState() { }
883-
public Azure.Search.Documents.Indexes.Models.IndexerStateHighWaterMark HighWaterMark { get { throw null; } }
891+
public Azure.Search.Documents.Indexes.Models.IndexerChangeTrackingState ChangeTrackingState { get { throw null; } }
884892
public Azure.Search.Documents.Indexes.Models.IndexingMode? Mode { get { throw null; } }
885893
public System.Collections.Generic.IReadOnlyList<string> ResetDataSourceDocumentIds { get { throw null; } }
886894
public System.Collections.Generic.IReadOnlyList<string> ResetDocumentKeys { get { throw null; } }
887895
}
888-
public partial class IndexerStateHighWaterMark
889-
{
890-
internal IndexerStateHighWaterMark() { }
891-
public string AllDocumentsFinalHighWaterMark { get { throw null; } }
892-
public string AllDocumentsInitialHighWaterMark { get { throw null; } }
893-
public string ResetDocumentsFinalHighWaterMark { get { throw null; } }
894-
public string ResetDocumentsInitialHighWaterMark { get { throw null; } }
895-
}
896896
public enum IndexerStatus
897897
{
898898
Unknown = 0,
@@ -2820,11 +2820,11 @@ public static partial class SearchModelFactory
28202820
public static Azure.Search.Documents.Indexes.Models.DataDeletionDetectionPolicy DataDeletionDetectionPolicy(string oDataType) { throw null; }
28212821
public static Azure.Search.Documents.Models.FacetResult FacetResult(long? count, System.Collections.Generic.IReadOnlyDictionary<string, object> additionalProperties) { throw null; }
28222822
public static Azure.Search.Documents.Models.IndexDocumentsResult IndexDocumentsResult(System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.IndexingResult> results) { throw null; }
2823+
public static Azure.Search.Documents.Indexes.Models.IndexerChangeTrackingState IndexerChangeTrackingState(string allDocumentsInitialState, string allDocumentsFinalState, string resetDocumentsInitialState, string resetDocumentsFinalState) { throw null; }
28232824
public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status = Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus.TransientFailure, Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail? statusDetail = default(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatusDetail?), Azure.Search.Documents.Indexes.Models.IndexerState currentState = null, string errorMessage = null, System.DateTimeOffset? startTime = default(System.DateTimeOffset?), System.DateTimeOffset? endTime = default(System.DateTimeOffset?), System.Collections.Generic.IEnumerable<Azure.Search.Documents.Indexes.Models.SearchIndexerError> errors = null, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Indexes.Models.SearchIndexerWarning> warnings = null, int itemCount = 0, int failedItemCount = 0, string initialTrackingState = null, string finalTrackingState = null) { throw null; }
28242825
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
28252826
public static Azure.Search.Documents.Indexes.Models.IndexerExecutionResult IndexerExecutionResult(Azure.Search.Documents.Indexes.Models.IndexerExecutionStatus status, string errorMessage, System.DateTimeOffset? startTime, System.DateTimeOffset? endTime, System.Collections.Generic.IReadOnlyList<Azure.Search.Documents.Indexes.Models.SearchIndexerError> errors, System.Collections.Generic.IReadOnlyList<Azure.Search.Documents.Indexes.Models.SearchIndexerWarning> warnings, int itemCount, int failedItemCount, string initialTrackingState, string finalTrackingState) { throw null; }
2826-
public static Azure.Search.Documents.Indexes.Models.IndexerState IndexerState(Azure.Search.Documents.Indexes.Models.IndexingMode? mode = default(Azure.Search.Documents.Indexes.Models.IndexingMode?), string allDocumentsInitialHighWaterMark = null, string allDocumentsFinalHighWaterMark = null, string resetDocumentsInitialHighWaterMark = null, string resetDocumentsFinalHighWaterMark = null, System.Collections.Generic.IEnumerable<string> resetDocumentKeys = null, System.Collections.Generic.IEnumerable<string> resetDataSourceDocumentIds = null) { throw null; }
2827-
public static Azure.Search.Documents.Indexes.Models.IndexerStateHighWaterMark IndexerStateHighWaterMark(string allDocumentsInitialHighWaterMark, string allDocumentsFinalHighWaterMark, string resetDocumentsInitialHighWaterMark, string resetDocumentsFinalHighWaterMark) { throw null; }
2827+
public static Azure.Search.Documents.Indexes.Models.IndexerState IndexerState(Azure.Search.Documents.Indexes.Models.IndexingMode? mode = default(Azure.Search.Documents.Indexes.Models.IndexingMode?), string allDocumentsInitialChangeTrackingState = null, string allDocumentsFinalChangeTrackingState = null, string resetDocumentsInitialChangeTrackingState = null, string resetDocumentsFinalChangeTrackingState = null, System.Collections.Generic.IEnumerable<string> resetDocumentKeys = null, System.Collections.Generic.IEnumerable<string> resetDataSourceDocumentIds = null) { throw null; }
28282828
public static Azure.Search.Documents.Models.IndexingResult IndexingResult(string key, string errorMessage, bool succeeded, int status) { throw null; }
28292829
public static Azure.Search.Documents.Indexes.Models.LexicalAnalyzer LexicalAnalyzer(string oDataType, string name) { throw null; }
28302830
public static Azure.Search.Documents.Indexes.Models.LexicalTokenizer LexicalTokenizer(string oDataType, string name) { throw null; }
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
namespace Azure.Search.Documents.Indexes.Models
5+
{
6+
/// <summary> Represents the change tracking state during an indexer's execution. </summary>
7+
public class IndexerChangeTrackingState
8+
{
9+
/// <summary>
10+
/// Initializes a new instance of the <see cref="IndexerChangeTrackingState"/> class.
11+
/// </summary>
12+
/// <param name="allDocumentsInitialState">Change tracking state used when indexing starts on all documents in the datasource.</param>
13+
/// <param name="allDocumentsFinalState">Change tracking state value when indexing finishes on all documents in the datasource.</param>
14+
/// <param name="resetDocumentsInitialState">Change tracking state used when indexing starts on select, reset documents in the datasource.</param>
15+
/// <param name="resetDocumentsFinalState">Change tracking state value when indexing finishes on select, reset documents in the datasource.</param>
16+
internal IndexerChangeTrackingState(string allDocumentsInitialState, string allDocumentsFinalState, string resetDocumentsInitialState, string resetDocumentsFinalState)
17+
{
18+
AllDocumentsInitialState = allDocumentsInitialState;
19+
AllDocumentsFinalState = allDocumentsFinalState;
20+
ResetDocumentsInitialState = resetDocumentsInitialState;
21+
ResetDocumentsFinalState = resetDocumentsFinalState;
22+
}
23+
24+
/// <summary> Change tracking state used when indexing starts on all documents in the datasource. </summary>
25+
public string AllDocumentsInitialState { get; }
26+
27+
/// <summary> Change tracking state value when indexing finishes on all documents in the datasource. </summary>
28+
public string AllDocumentsFinalState { get; }
29+
30+
/// <summary> Change tracking state used when indexing starts on select, reset documents in the datasource. </summary>
31+
public string ResetDocumentsInitialState { get; }
32+
33+
/// <summary> Change tracking state value when indexing finishes on select, reset documents in the datasource. </summary>
34+
public string ResetDocumentsFinalState { get; }
35+
}
36+
}

sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerState.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,41 @@ namespace Azure.Search.Documents.Indexes.Models
1111
public partial class IndexerState
1212
{
1313
/// <summary> Change tracking state used when indexing starts on all documents in the datasource. </summary>
14-
internal string AllDocsInitialChangeTrackingState => HighWaterMark.AllDocumentsInitialHighWaterMark;
14+
internal string AllDocsInitialChangeTrackingState => ChangeTrackingState.AllDocumentsInitialState;
1515

1616
/// <summary> Change tracking state value when indexing finishes on all documents in the datasource. </summary>
17-
internal string AllDocsFinalChangeTrackingState => HighWaterMark.AllDocumentsFinalHighWaterMark;
17+
internal string AllDocsFinalChangeTrackingState => ChangeTrackingState.AllDocumentsFinalState;
1818

1919
/// <summary> Change tracking state used when indexing starts on select, reset documents in the datasource. </summary>
20-
internal string ResetDocsInitialChangeTrackingState => HighWaterMark.ResetDocumentsInitialHighWaterMark;
20+
internal string ResetDocsInitialChangeTrackingState => ChangeTrackingState.ResetDocumentsInitialState ;
2121

2222
/// <summary> Change tracking state value when indexing finishes on select, reset documents in the datasource. </summary>
23-
internal string ResetDocsFinalChangeTrackingState => HighWaterMark.ResetDocumentsFinalHighWaterMark;
23+
internal string ResetDocsFinalChangeTrackingState => ChangeTrackingState.ResetDocumentsFinalState ;
2424

2525
/// <summary>
2626
/// Change tracking state for an indexer's execution.
2727
/// </summary>
28-
public IndexerStateHighWaterMark HighWaterMark { get; }
28+
public IndexerChangeTrackingState ChangeTrackingState { get; }
2929

3030
/// <summary> The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids. </summary>
3131
[CodeGenMember("ResetDatasourceDocumentIds")]
3232
public IReadOnlyList<string> ResetDataSourceDocumentIds { get; }
3333

3434
/// <summary> Initializes a new instance of IndexerState. </summary>
3535
/// <param name="mode"> The mode the indexer is running in. </param>
36-
/// <param name="allDocumentsInitialHighWaterMark"> Change tracking state used when indexing starts on all documents in the datasource. </param>
37-
/// <param name="allDocumentsFinalHighWaterMark"> Change tracking state value when indexing finishes on all documents in the datasource. </param>
38-
/// <param name="resetDocumentsInitialHighWaterMark"> Change tracking state used when indexing starts on select, reset documents in the datasource. </param>
39-
/// <param name="resetDocumentsFinalHighWaterMark"> Change tracking state value when indexing finishes on select, reset documents in the datasource. </param>
36+
/// <param name="allDocumentsInitialChangeTrackingState"> Change tracking state used when indexing starts on all documents in the datasource. </param>
37+
/// <param name="allDocumentsFinalChangeTrackingState"> Change tracking state value when indexing finishes on all documents in the datasource. </param>
38+
/// <param name="resetDocumentsInitialChangeTrackingState"> Change tracking state used when indexing starts on select, reset documents in the datasource. </param>
39+
/// <param name="resetDocumentsFinalChangeTrackingState"> Change tracking state value when indexing finishes on select, reset documents in the datasource. </param>
4040
/// <param name="resetDocumentKeys"> The list of document keys that have been reset. The document key is the document&apos;s unique identifier for the data in the search index. The indexer will prioritize selectively re-ingesting these keys. </param>
4141
/// <param name="resetDataSourceDocumentIds"> The list of datasource document ids that have been reset. The datasource document id is the unique identifier for the data in the datasource. The indexer will prioritize selectively re-ingesting these ids. </param>
42-
internal IndexerState(IndexingMode? mode, string allDocumentsInitialHighWaterMark, string allDocumentsFinalHighWaterMark, string resetDocumentsInitialHighWaterMark, string resetDocumentsFinalHighWaterMark, IReadOnlyList<string> resetDocumentKeys, IReadOnlyList<string> resetDataSourceDocumentIds)
42+
internal IndexerState(IndexingMode? mode, string allDocumentsInitialChangeTrackingState, string allDocumentsFinalChangeTrackingState, string resetDocumentsInitialChangeTrackingState, string resetDocumentsFinalChangeTrackingState, IReadOnlyList<string> resetDocumentKeys, IReadOnlyList<string> resetDataSourceDocumentIds)
4343
{
4444
Mode = mode;
4545
ResetDocumentKeys = resetDocumentKeys;
4646
ResetDataSourceDocumentIds = resetDataSourceDocumentIds;
4747

48-
HighWaterMark = new IndexerStateHighWaterMark(allDocumentsInitialHighWaterMark, allDocumentsFinalHighWaterMark, resetDocumentsInitialHighWaterMark, resetDocumentsFinalHighWaterMark);
48+
ChangeTrackingState = new IndexerChangeTrackingState(allDocumentsInitialChangeTrackingState, allDocumentsFinalChangeTrackingState, resetDocumentsInitialChangeTrackingState, resetDocumentsFinalChangeTrackingState);
4949
}
5050
}
5151
}

sdk/search/Azure.Search.Documents/src/Indexes/Models/IndexerStateHighWaterMark.cs

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)