Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ namespace Microsoft.Azure.Search.Models
/// </summary>
public static class IndexingParametersExtensions
{
private const string ParsingModeKey = "parsingMode";

/// <summary>
/// Specifies that the indexer will index only the storage metadata and completely skip the document extraction process. This is useful when
/// you don't need the document content, nor do you need any of the content type-specific metadata properties.
Expand Down Expand Up @@ -110,6 +112,21 @@ public static IndexingParameters SetBlobExtractionMode(this IndexingParameters p
return Configure(parameters, "dataToExtract", (string)extractionMode);
}

/// <summary>
/// Tells the indexer to assume that all blobs contain JSON, which it will then parse such that each blob's JSON 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>
/// <remarks>
/// This option only applies to indexers that index Azure Blob Storage.
/// </remarks>
/// <returns>The IndexingParameters instance.</returns>
public static IndexingParameters ParseJson(this IndexingParameters parameters)
{
return Configure(parameters, ParsingModeKey, "json");
}

/// <summary>
/// Specifies that <c cref="BlobExtractionMode.StorageMetadata">BlobExtractionMode.StorageMetadata</c> blob extraction mode will be
/// automatically used for blobs of unsupported content types. The default is false.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyDescription("Makes it easy to develop a .NET application that uses Azure Search.")]

[assembly: AssemblyVersion("3.0.0.0")]
[assembly: AssemblyFileVersion("3.0.2.0")]
[assembly: AssemblyFileVersion("3.0.3.0")]

[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
Expand Down
4 changes: 2 additions & 2 deletions src/Search/Microsoft.Azure.Search/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.0.2",
"version": "3.0.3",
"title": "Microsoft Azure Search Library",
"description": "Makes it easy to develop a .NET application that uses Azure Search.",
"authors": [ "Microsoft" ],
Expand All @@ -11,7 +11,7 @@
"iconUrl": "http://go.microsoft.com/fwlink/?LinkID=288890",
"tags": [ "Microsoft Azure Search", "REST HTTP client", "search", "azureofficial", "windowsazureofficial" ],
"requireLicenseAcceptance": true,
"releaseNotes": "This is the newest major version of the Azure Search .NET SDK, based on version 2016-09-01 of the Azure Search REST API. New in this version is support for indexing Azure Blob and Table storage, indexer field mappings, custom analyzers, and ETags. Also included is support for reflection-based field definitions via the FieldBuilder class, thanks to a contribution from Ian Griffiths (https://github.com/idg10). See this article for help on migrating to the latest version: http://aka.ms/search-sdk-upgrade."
"releaseNotes": "This is the newest major version of the Azure Search .NET SDK, based on version 2016-09-01 of the Azure Search REST API. New in this version is support for indexing Azure Blob storage (including parsing of JSON blobs), indexing Azure Table storage, indexer field mappings, custom analyzers, and ETags. Also included is support for reflection-based field definitions via the FieldBuilder class, thanks to a contribution from Ian Griffiths (https://github.com/idg10). See this article for help on migrating to the latest version: http://aka.ms/search-sdk-upgrade."
},

"buildOptions": {
Expand Down
2 changes: 1 addition & 1 deletion src/Search/Search.Management.Tests/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"Microsoft.Rest.ClientRuntime.Azure": "[3.3.4,4.0)",
"Microsoft.Azure.Management.ResourceManager": "1.1.1-preview",
"Microsoft.Azure.Management.Search": "1.0.1",
"Microsoft.Azure.Search": "3.0.2",
"Microsoft.Azure.Search": "3.0.3",
"xunit": "2.2.0-beta2-build3300",
"dotnet-test-xunit": "2.2.0-preview2-build1029"
}
Expand Down
9 changes: 9 additions & 0 deletions src/Search/Search.Tests/Tests/IndexingParametersTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@ namespace Microsoft.Azure.Search.Tests

public sealed class IndexingParametersTests
{
private const string ExpectedParsingModeKey = "parsingMode";

[Fact]
public void ParseJsonSetCorrectly()
{
var parameters = new IndexingParameters().ParseJson();
AssertHasConfigItem(parameters, ExpectedParsingModeKey, "json");
}

[Fact]
public void IndexFileNameExtensionsSetCorrectly()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Search/Search.Tests/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"version": "1.0.0"
},
"Search.Management.Tests": "1.0.0",
"Microsoft.Azure.Search": "3.0.2",
"Microsoft.Azure.Search": "3.0.3",
"Microsoft.AspNetCore.WebUtilities": "1.0.0"
}
}