Skip to content

Commit

Permalink
Initial SearchIndex creation model changes
Browse files Browse the repository at this point in the history
Also prototypes SynonymMap changes discussed in Azure#10725
  • Loading branch information
heaths committed Mar 31, 2020
1 parent 66c6b39 commit bd793ef
Show file tree
Hide file tree
Showing 31 changed files with 1,337 additions and 292 deletions.
6 changes: 6 additions & 0 deletions sdk/search/Azure.Search.Documents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@

## 1.0.0-preview.2 (Unreleased)

### Added

- Added models and methods to `SearchServiceClient` to create and manage indexes.

### Breaking Changes

- Renamed to Azure.Search.Documents (assembly, namespace, and package)
- Replaced SearchApiKeyCredential with AzureKeyCredential
- Renamed `SearchServiceClient.GetStatistics` and `SearchServiceClient.GetStatisticsAsync` to `SearchServiceClient.GetServiceStatistics` and `SearchServiceClient.GetServiceStatisticsAsync`

## 11.0.0-preview.1 (2020-03-13)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ public SearchServiceClient(System.Uri endpoint, Azure.AzureKeyCredential credent
public SearchServiceClient(System.Uri endpoint, Azure.AzureKeyCredential credential, Azure.Search.Documents.SearchClientOptions options) { }
public virtual System.Uri Endpoint { get { throw null; } }
public virtual string ServiceName { get { throw null; } }
public virtual Azure.Response<Azure.Search.Documents.Models.SearchIndex> CreateIndex(Azure.Search.Documents.Models.SearchIndex index, Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Models.SearchIndex>> CreateIndexAsync(Azure.Search.Documents.Models.SearchIndex index, Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Search.Documents.SearchIndexClient GetSearchIndexClient(string indexName) { throw null; }
public virtual Azure.Response<Azure.Search.Documents.Models.SearchServiceStatistics> GetStatistics(Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Models.SearchServiceStatistics>> GetStatisticsAsync(Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Search.Documents.Models.SearchServiceStatistics> GetServiceStatistics(Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Search.Documents.Models.SearchServiceStatistics>> GetServiceStatisticsAsync(Azure.Search.Documents.SearchRequestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
public partial class SuggestOptions : Azure.Search.Documents.SearchRequestOptions
{
Expand Down Expand Up @@ -203,8 +205,8 @@ internal AnalyzeResult() { }
public static Azure.Search.Documents.Models.AnalyzerName Pattern { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName PlLucene { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName PlMicrosoft { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName PtBRLucene { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName PtBRMicrosoft { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName PtBrLucene { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName PtBrMicrosoft { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName PtLucene { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName PtMicrosoft { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName RoLucene { get { throw null; } }
Expand All @@ -216,7 +218,7 @@ internal AnalyzeResult() { }
public static Azure.Search.Documents.Models.AnalyzerName SlMicrosoft { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName SrCyrillicMicrosoft { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName SrLatinMicrosoft { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName StandardasciifoldingLucene { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName StandardAsciiFoldingLucene { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName StandardLucene { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName Stop { get { throw null; } }
public static Azure.Search.Documents.Models.AnalyzerName SvLucene { get { throw null; } }
Expand Down Expand Up @@ -314,6 +316,15 @@ public CommonGramTokenFilter(string name, System.Collections.Generic.IEnumerable
public bool? IgnoreCase { get { throw null; } set { } }
public bool? UseQueryMode { get { throw null; } set { } }
}
public partial class ComplexField : Azure.Search.Documents.Models.FieldBase, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.FieldBase>, System.Collections.IEnumerable
{
public ComplexField(string name, bool collection = false) : base (default(string), default(Azure.Search.Documents.Models.DataType)) { }
public System.Collections.Generic.IList<Azure.Search.Documents.Models.FieldBase> Fields { get { throw null; } }
public void Add(Azure.Search.Documents.Models.FieldBase field) { }
protected override void Save(Azure.Search.Documents.Models.SearchField field) { }
System.Collections.Generic.IEnumerator<Azure.Search.Documents.Models.FieldBase> System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.FieldBase>.GetEnumerator() { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
}
public partial class ConditionalSkill : Azure.Search.Documents.Models.Skill
{
public ConditionalSkill(System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.InputFieldMappingEntry> inputs, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.OutputFieldMappingEntry> outputs) : base (default(System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.InputFieldMappingEntry>), default(System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.OutputFieldMappingEntry>)) { }
Expand Down Expand Up @@ -389,14 +400,15 @@ public DataSourceCredentials() { }
private readonly object _dummy;
private readonly int _dummyPrimitive;
public DataType(string value) { throw null; }
public static Azure.Search.Documents.Models.DataType EdmBoolean { get { throw null; } }
public static Azure.Search.Documents.Models.DataType EdmComplexType { get { throw null; } }
public static Azure.Search.Documents.Models.DataType EdmDateTimeOffset { get { throw null; } }
public static Azure.Search.Documents.Models.DataType EdmDouble { get { throw null; } }
public static Azure.Search.Documents.Models.DataType EdmGeographyPoint { get { throw null; } }
public static Azure.Search.Documents.Models.DataType EdmInt32 { get { throw null; } }
public static Azure.Search.Documents.Models.DataType EdmInt64 { get { throw null; } }
public static Azure.Search.Documents.Models.DataType EdmString { get { throw null; } }
public static Azure.Search.Documents.Models.DataType Boolean { get { throw null; } }
public static Azure.Search.Documents.Models.DataType Complex { get { throw null; } }
public static Azure.Search.Documents.Models.DataType DateTimeOffset { get { throw null; } }
public static Azure.Search.Documents.Models.DataType Double { get { throw null; } }
public static Azure.Search.Documents.Models.DataType GeographyPoint { get { throw null; } }
public static Azure.Search.Documents.Models.DataType Int32 { get { throw null; } }
public static Azure.Search.Documents.Models.DataType Int64 { get { throw null; } }
public static Azure.Search.Documents.Models.DataType String { get { throw null; } }
public static Azure.Search.Documents.Models.DataType Collection(Azure.Search.Documents.Models.DataType type) { throw null; }
public bool Equals(Azure.Search.Documents.Models.DataType other) { throw null; }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
public override bool Equals(object obj) { throw null; }
Expand Down Expand Up @@ -540,6 +552,14 @@ internal FacetResult() { }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
public bool TryGetValue(string key, out object value) { throw null; }
}
public abstract partial class FieldBase
{
public FieldBase(string name, Azure.Search.Documents.Models.DataType type) { }
public string Name { get { throw null; } }
public Azure.Search.Documents.Models.DataType Type { get { throw null; } }
public static implicit operator Azure.Search.Documents.Models.SearchField (Azure.Search.Documents.Models.FieldBase value) { throw null; }
protected abstract void Save(Azure.Search.Documents.Models.SearchField field);
}
public partial class FieldMapping
{
public FieldMapping(string sourceFieldName) { }
Expand Down Expand Up @@ -1147,6 +1167,15 @@ public ScoringProfile(string name) { }
public string Name { get { throw null; } }
public Azure.Search.Documents.Models.TextWeights TextWeights { get { throw null; } set { } }
}
public partial class SearchableField : Azure.Search.Documents.Models.SimpleField
{
public SearchableField(string name, bool collection = false) : base (default(string), default(Azure.Search.Documents.Models.DataType)) { }
public Azure.Search.Documents.Models.AnalyzerName? Analyzer { get { throw null; } set { } }
public Azure.Search.Documents.Models.AnalyzerName? IndexAnalyzer { get { throw null; } set { } }
public Azure.Search.Documents.Models.AnalyzerName? SearchAnalyzer { get { throw null; } set { } }
public System.Collections.Generic.IList<string> SynonymMaps { get { throw null; } }
protected override void Save(Azure.Search.Documents.Models.SearchField field) { }
}
public partial class SearchDocument : System.Dynamic.DynamicObject, System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<string, object>>, System.Collections.Generic.IDictionary<string, object>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, object>>, System.Collections.IEnumerable
{
public SearchDocument() { }
Expand Down Expand Up @@ -1179,17 +1208,19 @@ public SearchField(string name, Azure.Search.Documents.Models.DataType type) { }
public System.Collections.Generic.IList<Azure.Search.Documents.Models.SearchField> Fields { get { throw null; } set { } }
public bool? Filterable { get { throw null; } set { } }
public Azure.Search.Documents.Models.AnalyzerName? IndexAnalyzer { get { throw null; } set { } }
public bool? IsHidden { get { throw null; } set { } }
public bool? Key { get { throw null; } set { } }
public string Name { get { throw null; } }
public bool? Retrievable { get { throw null; } set { } }
public bool? Searchable { get { throw null; } set { } }
public Azure.Search.Documents.Models.AnalyzerName? SearchAnalyzer { get { throw null; } set { } }
public bool? Sortable { get { throw null; } set { } }
public System.Collections.Generic.IList<string> SynonymMaps { get { throw null; } set { } }
public Azure.Search.Documents.Models.DataType Type { get { throw null; } }
public override string ToString() { throw null; }
}
public partial class SearchIndex
{
public SearchIndex(string name) { }
public SearchIndex(string name, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.SearchField> fields) { }
public System.Collections.Generic.IList<Azure.Search.Documents.Models.Analyzer> Analyzers { get { throw null; } set { } }
public System.Collections.Generic.IList<Azure.Search.Documents.Models.CharFilter> CharFilters { get { throw null; } set { } }
Expand Down Expand Up @@ -1343,6 +1374,16 @@ public ShingleTokenFilter(string name) : base (default(string)) { }
public bool? OutputUnigramsIfNoShingles { get { throw null; } set { } }
public string TokenSeparator { get { throw null; } set { } }
}
public partial class SimpleField : Azure.Search.Documents.Models.FieldBase
{
public SimpleField(string name, Azure.Search.Documents.Models.DataType type) : base (default(string), default(Azure.Search.Documents.Models.DataType)) { }
public bool IsFacetable { get { throw null; } set { } }
public bool IsFilterable { get { throw null; } set { } }
public bool IsHidden { get { throw null; } set { } }
public bool IsKey { get { throw null; } set { } }
public bool IsSortable { get { throw null; } set { } }
protected override void Save(Azure.Search.Documents.Models.SearchField field) { }
}
public partial class Skill
{
public Skill(System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.InputFieldMappingEntry> inputs, System.Collections.Generic.IEnumerable<Azure.Search.Documents.Models.OutputFieldMappingEntry> outputs) { }
Expand Down Expand Up @@ -1578,7 +1619,8 @@ internal SuggestResults() { }
}
public partial class SynonymMap
{
public SynonymMap(string name, string synonyms) { }
public SynonymMap(string name, System.Collections.Generic.IEnumerable<string> synonyms, string format = "soln") { }
public SynonymMap(string name, string synonym, string format = "soln") { }
public Azure.Search.Documents.Models.EncryptionKey EncryptionKey { get { throw null; } set { } }
public string ETag { get { throw null; } set { } }
public string Format { get { throw null; } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ AzureKeyCredential credential = new AzureKeyCredential(
SearchServiceClient search = new SearchServiceClient(endpoint, credential);

// Perform an operation
Response<SearchServiceStatistics> stats = await search.GetStatisticsAsync();
Response<SearchServiceStatistics> stats = await search.GetServiceStatisticsAsync();
Console.WriteLine($"You are using {stats.Value.Counters.IndexCounter.Usage} indexes.");
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ AzureKeyCredential credential = new AzureKeyCredential(
SearchServiceClient search = new SearchServiceClient(endpoint, credential);

// Get and report the Search Service statistics
Response<SearchServiceStatistics> stats = await search.GetStatisticsAsync();
Response<SearchServiceStatistics> stats = await search.GetServiceStatisticsAsync();
Console.WriteLine($"You are using {stats.Value.Counters.IndexCounter.Usage} of {stats.Value.Counters.IndexCounter.Quota} indexes.");
```

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bd793ef

Please sign in to comment.