Created
July 28, 2015 12:52
-
-
Save Kevin-Bronsdijk/f2c4f4402219446bcbac to your computer and use it in GitHub Desktop.
azure-search-indexers-index-data-without-writing-code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE VIEW [SalesLT].[vProductAndDescriptionIndex] | |
WITH SCHEMABINDING | |
AS | |
-- View (indexed or standard) to display products and product descriptions by language. | |
SELECT | |
p.[ProductID] as [id] | |
,p.[Name] | |
,pm.[Name] AS [ProductModel] | |
,pmx.[Culture] | |
,pd.[Description] | |
FROM [SalesLT].[Product] p | |
INNER JOIN [SalesLT].[ProductModel] pm | |
ON p.[ProductModelID] = pm.[ProductModelID] | |
INNER JOIN [SalesLT].[ProductModelProductDescription] pmx | |
ON pm.[ProductModelID] = pmx.[ProductModelID] | |
INNER JOIN [SalesLT].[ProductDescription] pd | |
ON pmx.[ProductDescriptionID] = pd.[ProductDescriptionID]; | |
GO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name" : "datasource1", | |
"type" : "azuresql", | |
"credentials" : { "connectionString" : "Server=tcp:azuresearchindexer.database.windows.net,1433;Database=AzureSearchIndexer;User ID=XYZ;XYZ @A;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" }, | |
"container" : { "name" : "[SalesLT].[vProductAndDescriptionIndex] " } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name" : "indexer1", | |
"dataSourceName" : "datasource1", | |
"targetIndexName" : "index1" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"value": [ | |
{ | |
"@search.score": 1.3257511, | |
"id": "858", | |
"Name": "Half-Finger Gloves, S" | |
}, | |
{ | |
"@search.score": 1.3257511, | |
"id": "859", | |
"Name": "Half-Finger Gloves, M" | |
}, | |
{ | |
"@search.score": 1.3257511, | |
"id": "860", | |
"Name": "Half-Finger Gloves, L" | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment