Schema: ngram.sizes auf 2–10 begrenzen, combinedCache ergänzen
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
Die Gesamtabnahme fand zwei Lücken im Config-Vertrag: - ngram.sizes erlaubte minimum 1 und hatte kein maximum; der Server akzeptiert nur 2–10 (collection_setup.go) — das Schema ließ also Configs durch, die beim Projektload scheitern. - combinedCache fehlte komplett, obwohl Server (models.CombinedCacheConfig) und Doku den Block als Projekt-YAML führen; additionalProperties:false lehnte gültige, dokumentierte Configs ab. Ergänzt in collection.schema.json und index.d.ts (CombinedCacheConfig mit enabled/ttl/maxEntries). Die Demo-Collection ngram-stopwords.yml enthält jetzt eine Combined-Config mit combinedCache, sodass validate:schemas den Block abdeckt. Gegenprobe per AJV: sizes [1] und [11] werden abgelehnt, [2,3] und combinedCache akzeptiert.
This commit is contained in:
1 parent
9e12a8e9c3
commit
21472bdc72
3 files changed
+37
-1
No files matched your search
Vendored
+8
@@ -90,6 +90,12 @@ declare global {
|
||||
minMatchRatio?: number
|
||||
}
|
||||
|
||||
export interface CombinedCacheConfig {
|
||||
enabled?: boolean
|
||||
ttl?: string
|
||||
maxEntries?: number
|
||||
}
|
||||
|
||||
export interface NgramInMemoryConfig {
|
||||
enabled?: boolean
|
||||
maxDocs?: number
|
||||
@@ -193,6 +199,8 @@ declare global {
|
||||
filter?: { [key: string]: any }
|
||||
/** Ngram search configuration */
|
||||
ngram?: NgramConfig
|
||||
/** Result cache for combined searches */
|
||||
combinedCache?: CombinedCacheConfig
|
||||
/** Regex search configuration */
|
||||
regex?: RegexConfig
|
||||
/** Custom scoring for eval/filter search */
|
||||
|
||||
Reference in new issue
Block a user