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

Add support for Azure AI Search (Azure Cognitive Search) #14925

Merged
merged 35 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
dfc976f
adding project
MikeAlhayek Dec 18, 2023
0e199fb
Add Azure Cognative Search services
MikeAlhayek Dec 19, 2023
7386793
Add indices UI
MikeAlhayek Dec 20, 2023
2c6c174
Finish the search
MikeAlhayek Dec 20, 2023
500a13b
cleanup
MikeAlhayek Dec 20, 2023
f255a68
cleanup
MikeAlhayek Dec 20, 2023
e1f3725
cleanup
MikeAlhayek Dec 21, 2023
4b8e039
cleanup
MikeAlhayek Dec 21, 2023
796ad02
Update README.md
MikeAlhayek Dec 21, 2023
d18850a
Merge remote-tracking branch 'origin/main' into ma/cognative-search
MikeAlhayek Dec 21, 2023
5b75283
Move all the search settings into a single menu item.
MikeAlhayek Dec 21, 2023
2dca75c
Change how indexes are created by maintaing map
MikeAlhayek Dec 22, 2023
470fab8
Rebrand Azure Cognative Search to Azure AI Search
MikeAlhayek Dec 22, 2023
70faa1b
Merge branch 'main' into ma/cognative-search
MikeAlhayek Dec 22, 2023
d7007fe
file renaming for consistency
MikeAlhayek Dec 22, 2023
445356d
cleanup
MikeAlhayek Dec 22, 2023
cf08cd5
Fix build
MikeAlhayek Dec 22, 2023
e5c5633
menu cleanup
MikeAlhayek Dec 22, 2023
0d63da6
Add AzureAISearchIndexingService to allow populating items
MikeAlhayek Dec 23, 2023
366e61e
Added way to reset and rebuid index
MikeAlhayek Dec 23, 2023
b0fd28d
Adding recipe, deployment steps, and update docs.
MikeAlhayek Dec 23, 2023
2219cd0
add 1.9.0 release notes
MikeAlhayek Dec 23, 2023
81783e7
update code owners
MikeAlhayek Dec 26, 2023
17a3251
cleanup
MikeAlhayek Dec 26, 2023
90fd24f
Add events, add naming tests, cleanup helpers
MikeAlhayek Dec 28, 2023
3e4d84d
Add document events
MikeAlhayek Dec 28, 2023
1f7ac85
fix the pager
MikeAlhayek Dec 28, 2023
53b0541
simplify
MikeAlhayek Dec 28, 2023
c296e3f
cleanup
MikeAlhayek Dec 28, 2023
d5ec931
cleanup
MikeAlhayek Dec 31, 2023
f491e87
cleanup
MikeAlhayek Dec 31, 2023
e49f5eb
Store full name of the index in settings
MikeAlhayek Jan 2, 2024
b9d8f7f
Merge remote-tracking branch 'origin/main' into ma/cognative-search
MikeAlhayek Jan 2, 2024
f54f437
update docs
MikeAlhayek Jan 2, 2024
db8e5d8
Finalize docs
MikeAlhayek Jan 2, 2024
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
16 changes: 15 additions & 1 deletion OrchardCore.sln
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Sms.Abstraction
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Sms", "src\OrchardCore.Modules\OrchardCore.Sms\OrchardCore.Sms.csproj", "{CBF6DB53-FD0C-47F8-9E60-A1D247ACFD05}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrchardCore.Sms.Core", "src\OrchardCore\OrchardCore.Sms.Core\OrchardCore.Sms.Core.csproj", "{20356393-B16D-466C-8203-877A534E287D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Sms.Core", "src\OrchardCore\OrchardCore.Sms.Core\OrchardCore.Sms.Core.csproj", "{20356393-B16D-466C-8203-877A534E287D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.Azure.CognitiveSearch", "src\OrchardCore.Modules\OrchardCore.Search.Azure.CognitiveSearch\OrchardCore.Search.Azure.CognitiveSearch.csproj", "{5527BACF-FA5D-4617-978B-7EDE8942E6F6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OrchardCore.Search.Azure.CognitiveSearch.Core", "src\OrchardCore\OrchardCore.Search.Azure.CognitiveSearch.Core\OrchardCore.Search.Azure.CognitiveSearch.Core.csproj", "{E9428DE8-5D81-4359-BF84-31435041FF1A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -1335,6 +1339,14 @@ Global
{20356393-B16D-466C-8203-877A534E287D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20356393-B16D-466C-8203-877A534E287D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20356393-B16D-466C-8203-877A534E287D}.Release|Any CPU.Build.0 = Release|Any CPU
{5527BACF-FA5D-4617-978B-7EDE8942E6F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5527BACF-FA5D-4617-978B-7EDE8942E6F6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5527BACF-FA5D-4617-978B-7EDE8942E6F6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5527BACF-FA5D-4617-978B-7EDE8942E6F6}.Release|Any CPU.Build.0 = Release|Any CPU
{E9428DE8-5D81-4359-BF84-31435041FF1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E9428DE8-5D81-4359-BF84-31435041FF1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9428DE8-5D81-4359-BF84-31435041FF1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E9428DE8-5D81-4359-BF84-31435041FF1A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -1566,6 +1578,8 @@ Global
{2D93F509-1FB3-4E22-92F0-588D0EFBA921} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{CBF6DB53-FD0C-47F8-9E60-A1D247ACFD05} = {A066395F-6F73-45DC-B5A6-B4E306110DCE}
{20356393-B16D-466C-8203-877A534E287D} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
{5527BACF-FA5D-4617-978B-7EDE8942E6F6} = {90030E85-0C4F-456F-B879-443E8A3F220D}
{E9428DE8-5D81-4359-BF84-31435041FF1A} = {F23AC6C2-DE44-4699-999D-3C478EF3D691}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {46A1D25A-78D1-4476-9CBF-25B75E296341}
Expand Down
2 changes: 2 additions & 0 deletions src/OrchardCore.Build/Dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,7 @@
<PackageManagement Include="YesSql.Filters.Abstractions" Version="4.0.0-beta-0003" />
<PackageManagement Include="YesSql.Filters.Query" Version="4.0.0-beta-0003" />
<PackageManagement Include="ZString" Version="2.5.1" />
<PackageManagement Include="Azure.Search.Documents" Version="11.5.1" />
<PackageManagement Include="Microsoft.Extensions.Azure" Version="1.7.1" />
</ItemGroup>
</Project>
18 changes: 17 additions & 1 deletion src/OrchardCore.Cms.Web/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@
// "MaxPagedCount": 500
// }
//},
// Provides Azure Cognitive Search Connection
//"OrchardCore_CognitiveSearch_Azure": {
// "Endpoint": "",
// "IndexesPrefix": "",
// "Credential": {
// "Key": ""
// }
//},
// "Url": "http://localhost",
// "Ports": [ 9200 ],
// "Username": "admin",
// "Password": "admin",
// "CloudId": "Orchard_Core_deployment:ZWFzdHVzMi5henVyZS5lbGFzdGljLWNsb3VkLmNvbTo0NDMkNmMxZGQ4YzAzN2=",
// "CertificateFingerprint": "75:21:E7:92:8F:D5:7A:27:06:38:8E:A4:35:FE:F5:17:D7:37:F4:DF:F0:9A:D2:C0:C4:B6:FF:EE:D1:EA:2B:A7",
// "EnableApiVersioningHeader": false
//},
// Provides Elasticsearch Connection
//"OrchardCore_Elasticsearch": {
// "ConnectionType": "SingleNodeConnectionPool",
Expand All @@ -143,7 +159,7 @@
// "CloudId": "Orchard_Core_deployment:ZWFzdHVzMi5henVyZS5lbGFzdGljLWNsb3VkLmNvbTo0NDMkNmMxZGQ4YzAzN2=",
// "CertificateFingerprint": "75:21:E7:92:8F:D5:7A:27:06:38:8E:A4:35:FE:F5:17:D7:37:F4:DF:F0:9A:D2:C0:C4:B6:FF:EE:D1:EA:2B:A7",
// "EnableApiVersioningHeader": false
//}
//},
// WARNING: AutoSetup section given as an example for Development only, for Production use "Environment Variables" instead
//"OrchardCore_AutoSetup": {
// "AutoSetupPath": "",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Localization;
using OrchardCore.Navigation;

namespace OrchardCore.Search.Azure.CognitiveSearch;
MikeAlhayek marked this conversation as resolved.
Show resolved Hide resolved

public class AdminMenu : INavigationProvider
{
protected readonly IStringLocalizer S;

public AdminMenu(IStringLocalizer<AdminMenu> localizer)
{
S = localizer;
}

public Task BuildNavigationAsync(string name, NavigationBuilder builder)
{
if (!string.Equals(name, "admin", StringComparison.OrdinalIgnoreCase))
{
return Task.CompletedTask;
}

builder
.Add(S["Search"], NavigationConstants.AdminMenuSearchPosition, search => search
.AddClass("azurecognitiveservice")
.Id("azurecognitiveservice")
.Add(S["Indexing"], S["Indexing"].PrefixPosition(), indexing => indexing
.Add(S["Azure Cognitive Indices"], S["Azure Cognitive Indices"].PrefixPosition(), indexes => indexes
.Action("Index", "Admin", new { area = "OrchardCore.Search.Azure.CognitiveSearch" })
.Permission(AzureCognitiveSearchIndexPermissionHelper.ManageAzureCognitiveSearchIndexes)
.LocalNav()
)
)
);

return Task.CompletedTask;
}
}
Loading