Repository navigation
Releases: Ayanrocks/mneme
Releases · Ayanrocks/mneme
Release list
v0.6.0: Fuzzy Remix
Added
- Fuzzy Search Engine:
mneme findnow auto-corrects typos in search queries before executing. If a query term isn't found in the index, the engine substitutes the closest matching term and re-runs the search, printing a "Typo detected — did you mean…" hint to the user. internal/query/fuzzy.go: New package providing the core auto-correction pipeline —GetVocabulary,ExpandTokensWithFuzzy, andAutoCorrectQuery— which orchestrate candidate lookup, distance scoring, and query rewriting.- Trigram Index (
internal/utils/trigram.go): Character-trigram index over the full indexed vocabulary for fast O(1) candidate pre-filtering. Uses the Dice coefficient (TrigramSimilarityThreshold = 0.3) to short-circuit Levenshtein evaluation on dissimilar terms. - Damerau-Levenshtein Distance (
internal/utils/levenshtein.go): Replaced the standard Levenshtein implementation with the Optimal String Alignment variant of Damerau-Levenshtein, which counts adjacent transpositions (e.g.,"uesr"→"user") as a single edit, improving correction accuracy for common finger-slip typos. - Dynamic Edit-Distance Thresholding: Fuzzy matching applies a length-aware maximum edit distance — distance 1 for terms of 4–5 characters, distance 2 for terms of 6+ characters — to control false-positive corrections on short words.
- Compound Identifier Correction: Query terms that look like camelCase or snake_case identifiers are split into constituent parts, each part is independently corrected, and then recombined. This prevents over-eager fuzzy correction of technical identifiers.
- Fuzzy Constants (
internal/constants/fuzzy.go): Centralised tuning knobs —FuzzyMaxEditDistance,FuzzyMinTermLength,TrigramSimilarityThreshold, andFuzzyScorePenalty— making it easy to adjust matching behaviour without touching algorithm code. - Expanded Default Ignore List: Added
target,build, anddistto the default crawler ignore list ininternal/config/load.goto avoid indexing common build-output directories. - Binary Download Instructions in
README.md: Added a "Using a pre-built binary" section for users who do not have Go installed, covering Linux, macOS (Intel & Apple Silicon), and Windows. - Updated Logo: Replaced the placeholder logo with a high-resolution asset (
assets/logo.png).
Changed
- Find Command Fallback: Fixed the fallback path in
internal/cli/find.goso that corrected search terms (not the original rawdoc.MatchedTerms) are passed todisplay.FormatSearchResulton the first attempt. The original matched terms are only used as a fallback if the corrected highlight fails. - Fuzzy Score Penalty: Fuzzy-matched tokens are penalised by a configurable factor (
FuzzyScorePenalty = 0.8) so that exact matches always rank above auto-corrected results. - Tokenizer Hardening: Updated
internal/index/tokenizer.goto avoid splitting compound identifiers that are present as a single entry in the index, preventing ghost tokens that pollute fuzzy candidate lists.
Fixed
allCorrectedNever Reset: Fixed a logic bug inAutoCorrectQuerywhereallCorrectedwas initialised totruebut never set tofalsewhen a query part matched exactly or had no suitable correction, making therecombineguard condition always hold. NowallCorrectedis correctly set tofalsein both the exact-match and no-candidate branches.- Damerau vs. Standard Levenshtein: Replaced calls to the old
LevenshteinDistancehelper withDamerauLevenshteinDistanceandIsWithinDamerauDistancethroughoutinternal/query/fuzzy.go, fixing cases where single-transposition typos were incorrectly counted as two edits and thus rejected. - Config Ignore List Test: Updated
internal/core/config_test.goto expect the expanded nine-entry default ignore list, aligning the test with the updatedload.godefaults.
v0.5.0
Added
- Quoted Phrase Search: Use quotes in
mneme findto search for exact phrases (e.g.,mneme find "error handling" go). Multi-word quoted arguments are treated as phrase matches in snippet highlighting, while individual words are matched separately. - Query Parsing Module: New
internal/query/parse.gowithParseQueryInputfor structured tokenization of mixed phrase and keyword queries, with full test coverage. - Benchmark Suite: New
internal/benchmarkpackage with a build-tagged (//go:build benchmark) test suite that measures crawl, index, search, read, and write throughput across corpus sizes of 100–5,000 files. Results are printed as a formatted table. Run viamake benchmarks. TESTING.md: Added documentation for the benchmark targets.
Changed
- Find Command UX: Improved
Longdescription andExamplefields for thefindcommand with clear usage patterns for phrase vs. keyword search. - Search Result Filtering: Results are now filtered to only include documents with actual text-matching snippets, reducing false positives from BM25 stemming.
- Code Cleanup: Removed unused exported functions, aligned comments, and applied CodeRabbit review suggestions across multiple packages.
Fixed
- Benchmark Isolation: Fixed benchmark tests leaking into the user's real config and data directories by saving and restoring
constants.ConfigPathalongsideconstants.DirPath. - Test Stability: Fixed failing tests caused by stray quote characters in query argument handling.
v0.3.0
Added
- Windows Support: Full cross-platform support for Windows, including platform-specific path handling and OS detection stored in the
VERSIONfile for compatibility checks. - Platform Abstraction Layer: New
internal/platformpackage with platform-specific implementations (platform_unix.go,platform_windows.go) for portable path resolution and data directory management. - CI/CD Pipelines: Added GitHub Actions workflows for automated testing (
test.yml) and release builds (release.yml). - Build System: Introduced a
Makefilewith standard build targets for streamlined local development and CI builds. - CLI Enhancements: Added comprehensive descriptions and illustrative examples to all commands and subcommands for a better help experience.
Changed
- Configuration Restructure: Moved configuration constants to
internal/constantsfor clearer package responsibilities. - Crawler Hardening: The crawler now skips Windows system files and directories (e.g.,
$Recycle.Bin,System Volume Information) using a case-insensitive lookup. - Storage Paths: Updated
internal/storage/fs.goto use the new platform abstraction layer for resolving data directories, replacing hardcoded Unix paths. - Documentation: Updated
README.mdwith data store details and improved build instructions.
Fixed
- Windows Temp Dir Fallback: Resolved an issue where the Windows fallback path could cause permission errors by using the system temp directory instead.
v0.2.0: Inital Release
Added
- Pluggable Ingestor System: Introduced
Ingestorinterface to support multiple file sources, enabling future extensions beyond the local filesystem. - Batch Indexing: Implemented LSM-tree inspired batch processing for index creation. This significantly reduces memory usage during indexing by writing numbered chunks and maintaining a
manifest.json. - BM25 & VSM Ranking: Integrated BM25 and Vector Space Model algorithms to improve search result relevance and ranking.
- Binary Segment Storage: Transititioned segment storage to Protocol Buffers for improved performance and reduced disk footprint.
- Tombstones & Cleanup: Added
mneme cleancommand and a tombstone mechanism to safely manage and remove obsolete index files. - Multilingual Tokenization: Enhanced tokenization logic to better support multi-lingual text analysis.
- Configurable Logging: Added log level configuration (defaulting to
info) to reduce noise. - Binary File Skipping: The crawler now automatically identifies and skips binary files (e.g., images, videos) to prevent indexing garbage data.
- Exclude Extensions: new configuration option
exclude_extensionsto explicitly ignore specific file types.
Changed
- Core Refactor: Moved primary data structures to
internal/coreto improve modularity and reduce circular dependencies. - Progress Bar: Unified the progress bar implementation to be "sticky" at the bottom of the terminal, providing a cleaner UX.
- Search Highlighting: Improved snippet generation to accurately highlight partial matches in search results.
- Configuration: Cleanup of unused ranking weights in the configuration file.
Fixed
- Module Dependencies: Resolved indirect dependency issues in
go.mod. - Test Stability: Fixed flaky tests in
configandloggerpackages related to environment permissions and default values.
What's Changed
- Ingestor implementation by @Ayanrocks in #1
New Contributors
- @Ayanrocks made their first contribution in #1
Full Changelog: https://github.com/Ayanrocks/mneme/commits/v0.2.0