Commit 1cbb7b3
committed
feat(search): Integrate index cache into search flow
When use_sqlite_cache is disabled, try the binary-index cache first
for literal queries. Regex metacharacters (.+*?|[]{}^$\ etc.) skip
the cache path and go directly to the regex full-scan, preserving
documented regex semantics.
Cache hit: in-memory search (~200ms), no file I/O.
Cache miss: fall back to original regex search (~3s), then build
cache for next invocation.
Also separates the query string from the compiled Regex object,
fixing a latent bug where search_remotes received a Regex instead
of the original string (previously relied on .ToString() coincidence).1 parent 5a57496 commit 1cbb7b3
1 file changed
Lines changed: 25 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
298 | 301 | | |
299 | 302 | | |
300 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
301 | 310 | | |
302 | | - | |
303 | | - | |
304 | | - | |
305 | | - | |
306 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
307 | 319 | | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
308 | 323 | | |
309 | 324 | | |
310 | 325 | | |
| |||
0 commit comments