diff --git a/GanjooRazor/APIRoot.cs b/GanjooRazor/APIRoot.cs
index cd5502a9..845e7c1e 100644
--- a/GanjooRazor/APIRoot.cs
+++ b/GanjooRazor/APIRoot.cs
@@ -45,5 +45,30 @@ namespace GanjooRazor
return _InternetUrl;
}
}
+
+ private static string _semanticSearchUrl = "";
+
+ ///
+ /// Semantic search API endpoint — deliberately configurable separately from
+ /// Url/InternetUrl. Currently points at a physically separate domain/app pool
+ /// (ganjgah.ir) hosting the same RMuseum codebase, so that a problem with this one
+ /// feature (a native ONNX Runtime crash, a performance issue, anything) can't affect
+ /// api.ganjoor.net or the main site at all — proven necessary by an actual production
+ /// incident, not a hypothetical precaution. Point this at the main API root instead once
+ /// the feature has run stably on its own domain for a while.
+ ///
+ public static string SemanticSearchUrl
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(_semanticSearchUrl))
+ return _semanticSearchUrl;
+ IConfigurationRoot configuration = new ConfigurationBuilder()
+ .SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json")
+ .Build();
+ _semanticSearchUrl = configuration["SemanticSearchAPIRoot"];
+ return _semanticSearchUrl;
+ }
+ }
}
}
diff --git a/GanjooRazor/Pages/SemanticSearch.cshtml b/GanjooRazor/Pages/SemanticSearch.cshtml
new file mode 100644
index 00000000..d0356b05
--- /dev/null
+++ b/GanjooRazor/Pages/SemanticSearch.cshtml
@@ -0,0 +1,140 @@
+@page
+@model GanjooRazor.Pages.SemanticSearchModel
+@{
+ Layout = "_Layout";
+ ViewData["Title"] = "جستوجوی معنایی";
+}
+@section Head {
+
+}
+
+
+
+
جستوجوی معنایی
+
+ بهجای جستوجوی کلمهبهکلمه، توصیف کنید دنبال چه مضمونی هستید — مثلاً «شعری دربارهٔ بیوفایی دنیا».
+
+ اگر نام یک سخنور یا یک بخش/کتاب خاص را هم در جمله بیاورید (مثلاً «در کدام شعر حافظ» یا «در کدام بخش شاهنامه»)، جستوجو فقط در همان محدوده انجام میشود.
+
+
+
+
+
+
+
+
+
+
+@section Scripts {
+
+}
diff --git a/GanjooRazor/Pages/SemanticSearch.cshtml.cs b/GanjooRazor/Pages/SemanticSearch.cshtml.cs
new file mode 100644
index 00000000..38cc4e3e
--- /dev/null
+++ b/GanjooRazor/Pages/SemanticSearch.cshtml.cs
@@ -0,0 +1,69 @@
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.RazorPages;
+using System;
+using System.Net;
+using System.Net.Http;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace GanjooRazor.Pages
+{
+ ///