Skip to content
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

[Azure Search] Prepare 5.0 data plane SDK for release #4246

Merged
merged 7 commits into from
Apr 19, 2018
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Description>Common types needed by the Azure Search .NET libraries. This is not the package you are looking for; It is only meant to be used as a dependency.</Description>
<AssemblyTitle>Microsoft Azure Search Common Library</AssemblyTitle>
<AssemblyName>Microsoft.Azure.Search.Common</AssemblyName>
<VersionPrefix>5.0.0-preview</VersionPrefix>
<VersionPrefix>5.0.0</VersionPrefix>
<PackageReleaseNotes>See the Microsoft.Azure.Search package for detailed release notes on the entire Azure Search .NET SDK.</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license information.

using System.Reflection;
using System.Resources;

[assembly: AssemblyVersion("5.0.0.0")]
[assembly: AssemblyFileVersion("5.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_SearchIndexClie
{
return new Tuple<string, string, string>[]
{
new Tuple<string, string, string>("SearchIndexClient", "DocumentsProxy", "2016-09-01-Preview"),
new Tuple<string, string, string>("SearchIndexClient", "DocumentsProxy", "2017-11-11"),
}.AsEnumerable();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ private void Initialize()
{
Documents = new DocumentsOperations(this);
BaseUri = "https://{searchServiceName}.{searchDnsSuffix}/indexes('{indexName}')";
ApiVersion = "2016-09-01-Preview";
ApiVersion = "2017-11-11";
SearchDnsSuffix = "search.windows.net";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Description>Use this package if you're developing a .NET application using Azure Search, and you only need to query or update documents in your indexes. If you also need to create or update indexes, synonym maps, or other service-level resources, use the Microsoft.Azure.Search package instead.</Description>
<AssemblyTitle>Microsoft Azure Search Data Library</AssemblyTitle>
<AssemblyName>Microsoft.Azure.Search.Data</AssemblyName>
<VersionPrefix>5.0.0-preview</VersionPrefix>
<VersionPrefix>5.0.0</VersionPrefix>
<PackageReleaseNotes>See the Microsoft.Azure.Search package for detailed release notes on the entire Azure Search .NET SDK.</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
Expand All @@ -15,7 +15,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Spatial" Version="7.2.0" />
<PackageReference Include="Microsoft.Azure.Search.Common" Version="[5.0.0-preview, 6.0.0)" />
<PackageReference Include="Microsoft.Azure.Search.Common" Version="[5.0.0, 6.0.0)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.Azure.Search.Common\Microsoft.Azure.Search.Common.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license information.

using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;

[assembly: AssemblyVersion("5.0.0.0")]
Expand All @@ -19,6 +18,6 @@ namespace Microsoft.Azure.Search
internal class Consts
{
// Putting this in AssemblyInfo.cs so we remember to change it when the major SDK version changes.
public const string TargetApiVersion = "2016-09-01-Preview";
public const string TargetApiVersion = "2017-11-11";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,62 +93,6 @@ public static IndexingParameters SetBlobExtractionMode(this IndexingParameters p
public static IndexingParameters ParseJson(this IndexingParameters parameters) =>
Configure(parameters, ParsingModeKey, "json");

/// <summary>
/// Tells the indexer to assume that all blobs contain JSON arrays, which it will then parse such that each JSON object in each array will
/// map to a single document in the Azure Search index.
/// See <see href="https://docs.microsoft.com/azure/search/search-howto-index-json-blobs" /> for details.
/// </summary>
/// <param name="parameters">IndexingParameters to configure.</param>
/// <param name="documentRoot">
/// An optional JSON Pointer that tells the indexer how to find the JSON array if it's not the top-level JSON property of each blob. If this
/// parameter is null or empty, the indexer will assume that the JSON array can be found in the top-level JSON property of each blob.
/// Default is null.
/// </param>
/// <remarks>
/// This option only applies to indexers that index Azure Blob Storage.
/// </remarks>
/// <returns>The IndexingParameters instance.</returns>
public static IndexingParameters ParseJsonArrays(this IndexingParameters parameters, string documentRoot = null)
{
Configure(parameters, ParsingModeKey, "jsonArray");

if (!string.IsNullOrEmpty(documentRoot))
{
Configure(parameters, "documentRoot", documentRoot);
}

return parameters;
}

/// <summary>
/// Tells the indexer to assume that all blobs are delimited text files. Currently only comma-separated value (CSV) text files are supported.
/// See <see href="https://docs.microsoft.com/azure/search/search-howto-index-csv-blobs" /> for details.
/// </summary>
/// <param name="parameters">IndexingParameters to configure.</param>
/// <param name="headers">
/// Specifies column headers that the indexer will use to map values to specific fields in the Azure Search index. If you don't specify any
/// headers, the indexer assumes that the first non-blank line of each blob contains comma-separated headers.
/// </param>
/// <remarks>
/// This option only applies to indexers that index Azure Blob Storage.
/// </remarks>
/// <returns>The IndexingParameters instance.</returns>
public static IndexingParameters ParseDelimitedTextFiles(this IndexingParameters parameters, params string[] headers)
{
Configure(parameters, ParsingModeKey, "delimitedText");

if (headers?.Length > 0)
{
Configure(parameters, "delimitedTextHeaders", headers.ToCommaSeparatedString());
}
else
{
Configure(parameters, "firstLineContainsHeaders", true);
}

return parameters;
}

/// <summary>
/// Tells the indexer to assume that blobs should be parsed as text files in UTF-8 encoding.
/// See <see href="https://docs.microsoft.com/azure/search/search-howto-indexing-azure-blob-storage#indexing-plain-text"/>
Expand Down Expand Up @@ -184,7 +128,7 @@ public static IndexingParameters ParseText(this IndexingParameters parameters, E
/// <param name="parameters">IndexingParameters to configure.</param>
/// <returns></returns>
/// <returns>The IndexingParameters instance.</returns>
[Obsolete("This behavior is enabled by default in API version 2016-09-01-Preview and calling this method is no longer necessary")]
[Obsolete("This behavior is now enabled by default, so calling this method is no longer necessary.")]
public static IndexingParameters DoNotFailOnUnsupportedContentType(this IndexingParameters parameters) =>
Configure(parameters, "failOnUnsupportedContentType", false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,9 @@ public ServiceLimits()
/// </summary>
/// <param name="maxFieldsPerIndex">The maximum allowed fields per
/// index.</param>
/// <param name="maxFieldNestingDepthPerIndex">The maximum depth which
/// you can nest sub-fields in an index, including the top-level
/// complex field. For example, a/b/c has a nesting depth of 3.</param>
/// <param name="maxComplexCollectionFieldsPerIndex">The maximum number
/// of fields of type Collection(Edm.ComplexType) allowed in an
/// index.</param>
public ServiceLimits(int? maxFieldsPerIndex = default(int?), int? maxFieldNestingDepthPerIndex = default(int?), int? maxComplexCollectionFieldsPerIndex = default(int?))
public ServiceLimits(int? maxFieldsPerIndex = default(int?))
{
MaxFieldsPerIndex = maxFieldsPerIndex;
MaxFieldNestingDepthPerIndex = maxFieldNestingDepthPerIndex;
MaxComplexCollectionFieldsPerIndex = maxComplexCollectionFieldsPerIndex;
CustomInit();
}

Expand All @@ -56,20 +48,5 @@ public ServiceLimits()
[JsonProperty(PropertyName = "maxFieldsPerIndex")]
public int? MaxFieldsPerIndex { get; set; }

/// <summary>
/// Gets or sets the maximum depth which you can nest sub-fields in an
/// index, including the top-level complex field. For example, a/b/c
/// has a nesting depth of 3.
/// </summary>
[JsonProperty(PropertyName = "maxFieldNestingDepthPerIndex")]
public int? MaxFieldNestingDepthPerIndex { get; set; }

/// <summary>
/// Gets or sets the maximum number of fields of type
/// Collection(Edm.ComplexType) allowed in an index.
/// </summary>
[JsonProperty(PropertyName = "maxComplexCollectionFieldsPerIndex")]
public int? MaxComplexCollectionFieldsPerIndex { get; set; }

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ public static IEnumerable<Tuple<string, string, string>> ApiInfo_SearchServiceCl
{
return new Tuple<string, string, string>[]
{
new Tuple<string, string, string>("SearchServiceClient", "DataSources", "2016-09-01-Preview"),
new Tuple<string, string, string>("SearchServiceClient", "GetServiceStatistics", "2016-09-01-Preview"),
new Tuple<string, string, string>("SearchServiceClient", "Indexers", "2016-09-01-Preview"),
new Tuple<string, string, string>("SearchServiceClient", "Indexes", "2016-09-01-Preview"),
new Tuple<string, string, string>("SearchServiceClient", "SynonymMaps", "2016-09-01-Preview"),
new Tuple<string, string, string>("SearchServiceClient", "DataSources", "2017-11-11"),
new Tuple<string, string, string>("SearchServiceClient", "GetServiceStatistics", "2017-11-11"),
new Tuple<string, string, string>("SearchServiceClient", "Indexers", "2017-11-11"),
new Tuple<string, string, string>("SearchServiceClient", "Indexes", "2017-11-11"),
new Tuple<string, string, string>("SearchServiceClient", "SynonymMaps", "2017-11-11"),
}.AsEnumerable();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ private void Initialize()
SynonymMaps = new SynonymMapsOperations(this);
Indexes = new IndexesOperations(this);
BaseUri = "https://{searchServiceName}.{searchDnsSuffix}";
ApiVersion = "2016-09-01-Preview";
ApiVersion = "2017-11-11";
SearchDnsSuffix = "search.windows.net";
AcceptLanguage = "en-US";
LongRunningOperationRetryTimeout = 30;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Description>Use this package if you're developing automation in .NET to manage Azure Search indexes, synonym maps, indexers, data sources, or other service-level resources. If you only need to query or update documents in your indexes, use the Microsoft.Azure.Search.Data package instead. If you need all the functionality of Azure Search, use the Microsoft.Azure.Search package instead.</Description>
<AssemblyTitle>Microsoft Azure Search Service Library</AssemblyTitle>
<AssemblyName>Microsoft.Azure.Search.Service</AssemblyName>
<VersionPrefix>5.0.0-preview</VersionPrefix>
<VersionPrefix>5.0.0</VersionPrefix>
<PackageReleaseNotes>See the Microsoft.Azure.Search package for detailed release notes on the entire Azure Search .NET SDK.</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
Expand All @@ -15,7 +15,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.Spatial" Version="7.2.0" />
<PackageReference Include="Microsoft.Azure.Search.Common" Version="[5.0.0-preview, 6.0.0)" />
<PackageReference Include="Microsoft.Azure.Search.Common" Version="[5.0.0, 6.0.0)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.Azure.Search.Common\Microsoft.Azure.Search.Common.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license information.

using System.Reflection;
using System.Resources;

[assembly: AssemblyVersion("5.0.0.0")]
[assembly: AssemblyFileVersion("5.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
<Description>Makes it easy to develop a .NET application that uses Azure Search.</Description>
<AssemblyTitle>Microsoft Azure Search Library</AssemblyTitle>
<AssemblyName>Microsoft.Azure.Search</AssemblyName>
<VersionPrefix>5.0.0-preview</VersionPrefix>
<PackageReleaseNotes>This is a preview of the newest major version of the Azure Search .NET SDK, based on version 2016-09-01-Preview of the Azure Search REST API. New in this version is support for synonyms and indexer support for JSON Blobs. See this article for help on migrating to the latest version: http://aka.ms/search-sdk-upgrade.</PackageReleaseNotes>
<VersionPrefix>5.0.0</VersionPrefix>
<PackageReleaseNotes>This is the newest major version of the Azure Search .NET SDK, based on version 2017-11-11 of the Azure Search REST API. New in this GA version is support for synonyms. See this article for help on migrating to the latest version: http://aka.ms/search-sdk-upgrade.</PackageReleaseNotes>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\AssemblyInfo.Common.cs" Link="Properties\AssemblyInfo.Common.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Search.Data" Version="[5.0.0-preview, 6.0.0)" />
<PackageReference Include="Microsoft.Azure.Search.Service" Version="[5.0.0-preview, 6.0.0)" />
<PackageReference Include="Microsoft.Azure.Search.Data" Version="[5.0.0, 6.0.0)" />
<PackageReference Include="Microsoft.Azure.Search.Service" Version="[5.0.0, 6.0.0)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.Azure.Search.Data\Microsoft.Azure.Search.Data.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// license information.

using System.Reflection;
using System.Resources;

[assembly: AssemblyVersion("5.0.0.0")]
[assembly: AssemblyFileVersion("5.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Search.Test")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
Loading