@@ -231,7 +252,7 @@
var statusEl = document.getElementById("ss-widget-status");
resultsEl.innerHTML = "";
statusEl.style.display = "block";
- statusEl.textContent = "در حال جستوجو...";
+ statusEl.textContent = "در حال جستجو...";
$.ajax({
type: "POST",
@@ -245,7 +266,7 @@
error: function (xhr) {
statusEl.style.display = "block";
if (xhr.status === 503) {
- statusEl.textContent = "در حال حاضر جستوجوی معنایی در دسترس نیست. لطفاً کمی بعد دوباره امتحان کنید.";
+ statusEl.textContent = "در حال حاضر جستجوی معنایی در دسترس نیست. لطفاً کمی بعد دوباره امتحان کنید.";
} else if (xhr.responseText) {
statusEl.textContent = "خطا: " + xhr.responseText;
} else {
diff --git a/RMuseum/RMuseum.xml b/RMuseum/RMuseum.xml
index d703f23c..6dbdb2d8 100644
--- a/RMuseum/RMuseum.xml
+++ b/RMuseum/RMuseum.xml
@@ -24564,17 +24564,29 @@
pool: each process gets its own instance of this (and everything it loads) — "singleton"
only means one instance per process, not per server. See the migration notes for the
memory math this implies at scale.
+
+ SemanticSearch:Enabled gates ALL of the above, checked before anything else runs — this
+ is what actually keeps a disabled instance (e.g. api.ganjoor.net, where third-party apps
+ shouldn't get this feature) from ever loading the ~530MB embeddings file or the ONNX model
+ into memory at all, not just from serving requests. Defaults to disabled (fail-closed) if
+ the key is missing entirely — deliberately, since the whole point of this flag is
+ preventing resource loading on instances that shouldn't have it; an instance that's
+ SUPPOSED to have it (ganjgah.ir) needs the key explicitly set to "True", not left implicit.
-
- Attempts to load the resources on first call (subsequent calls reuse the same result,
- success or failure — this never retries automatically; a fresh app start is required
- to try again after a config/file fix, which is the expected deploy-and-restart flow
- anyway). Returns true and populates both out parameters if available; returns false
- and populates otherwise. NEVER THROWS — that guarantee is the
- entire point of this class.
-
+
+ Attempts to load the resources on first call (subsequent calls reuse the same result,
+ success or failure — this never retries automatically; a fresh app start is required
+ to try again after a config/file fix, which is the expected deploy-and-restart flow
+ anyway). Returns true and populates both out parameters if available; returns false
+ and populates otherwise. NEVER THROWS — that guarantee is the
+ entire point of this class.
+
+ If SemanticSearch:Enabled isn't "True", this returns false immediately, every call,
+ without ever touching EmbeddingIndex.Load/QueryEmbedder's constructor — the actual
+ mechanism that keeps a disabled instance from loading anything into memory at all.
+