Spaces:
Running
Running
Sync from felladrin/MiniSearch@faa1dc2
Browse files- changelog.md +1 -0
- docs/overview.md +1 -0
changelog.md
CHANGED
|
@@ -5,6 +5,7 @@ Notable changes, grouped by date, most recent first.
|
|
| 5 |
|
| 6 |
## 2026-10-08
|
| 7 |
|
|
|
|
| 8 |
- Added an optional second source for text searches, so a SearXNG outage no longer has to end in a 502. It stays off unless `SEARCH_FALLBACK_ENABLED` is `true` or `1`, and flipping it takes a restart, since a process keeps the environment it was started with. When it is on, the second source is consulted only after SearXNG has failed (an HTTP error, a network error, every engine unresponsive, or an open circuit), under one 15-second budget for the whole exchange and under a 25-second deadline measured from the start of the search, and only for text searches: image searches still answer 502 as before. The query goes to `search.parallel.ai`, which sees the query text and this server's IP address, never the user's. A retry that comes back with nothing usable now answers HTTP 200 with no results, so the UI shows "No results found" rather than "Text search unavailable"; a retry that fails itself, or that the search deadline has left under two seconds for, falls through to the old 502. `SEARCH_FALLBACK_API_KEY` is optional and is sent as a Bearer token, which raises the provider's free-tier rate limits. `/status` gained `searchesServedByFallback` and `searchesFailedOnFallback`, plain counts that never carry a query, so you can see whether the second source is earning its place.
|
| 9 |
|
| 10 |
|
|
|
|
| 5 |
|
| 6 |
## 2026-10-08
|
| 7 |
|
| 8 |
+
- `/status` now reports `authorization.distinctRejectedTokens`, the number of distinct dead tokens the server has cached and keeps refusing. A steady stream of invalid-token rejections with a value of 1 there is one client replaying one stale token, not many old search links, which the existing counters could not tell apart.
|
| 9 |
- Added an optional second source for text searches, so a SearXNG outage no longer has to end in a 502. It stays off unless `SEARCH_FALLBACK_ENABLED` is `true` or `1`, and flipping it takes a restart, since a process keeps the environment it was started with. When it is on, the second source is consulted only after SearXNG has failed (an HTTP error, a network error, every engine unresponsive, or an open circuit), under one 15-second budget for the whole exchange and under a 25-second deadline measured from the start of the search, and only for text searches: image searches still answer 502 as before. The query goes to `search.parallel.ai`, which sees the query text and this server's IP address, never the user's. A retry that comes back with nothing usable now answers HTTP 200 with no results, so the UI shows "No results found" rather than "Text search unavailable"; a retry that fails itself, or that the search deadline has left under two seconds for, falls through to the old 502. `SEARCH_FALLBACK_API_KEY` is optional and is sent as a Bearer token, which raises the provider's free-tier rate limits. `/status` gained `searchesServedByFallback` and `searchesFailedOnFallback`, plain counts that never carry a query, so you can see whether the second source is earning its place.
|
| 10 |
|
| 11 |
|
docs/overview.md
CHANGED
|
@@ -347,6 +347,7 @@ verification, the funnel `/search/text`, `/search/images`, `/page-content` and
|
|
| 347 |
| `reasons.invalidToken` | number | A token that failed verification, which is what probing looks like |
|
| 348 |
| `bySurface` | object | `authorized` and `rejected` per endpoint family: `search`, `pageContent`, `thumbnail`, `inference`, `other` |
|
| 349 |
| `rejectedTokenCacheHits` | number | Rejections served from the rejected-token cache without a second argon2 verification |
|
|
|
|
| 350 |
| `limiter` | object | The shared limiter's `points` and `durationSeconds`, plus the separate `thumbnail` budget behind `/thumbnail`, without which a rejection count says nothing |
|
| 351 |
|
| 352 |
`authorized` plus every entry of `reasons` sums to `requests`, and each half of
|
|
|
|
| 347 |
| `reasons.invalidToken` | number | A token that failed verification, which is what probing looks like |
|
| 348 |
| `bySurface` | object | `authorized` and `rejected` per endpoint family: `search`, `pageContent`, `thumbnail`, `inference`, `other` |
|
| 349 |
| `rejectedTokenCacheHits` | number | Rejections served from the rejected-token cache without a second argon2 verification |
|
| 350 |
+
| `distinctRejectedTokens` | number | Distinct tokens the rejected-token cache holds, at most 1024. Only well-formed tokens that failed argon2 verification enter it; a token without the expected hash prefix is refused before that and never counted. A high `reasons.invalidToken` with a value of 1 here is one client replaying one dead token. A value that keeps growing is either many stale links or one caller sending fresh junk hashes, which the limiter caps per IP. The set only empties on a restart and evicts its oldest entry when full, so a value of 1024 means 1024 or more |
|
| 351 |
| `limiter` | object | The shared limiter's `points` and `durationSeconds`, plus the separate `thumbnail` budget behind `/thumbnail`, without which a rejection count says nothing |
|
| 352 |
|
| 353 |
`authorized` plus every entry of `reasons` sums to `requests`, and each half of
|