Skip to main content
Prompts Go High-Performance Filesystem Indexer and Search Tool

developer coding user risk: low

Go High-Performance Filesystem Indexer and Search Tool

Build a high-performance file system indexer and search tool in Go. Implement features including recursive directory traversal, file metadata extraction, content indexing with full…

PROMPT

Build a high-performance file system indexer and search tool in Go. Implement recursive directory traversal with configurable depth. Add file metadata extraction including size, dates, and permissions. Include content indexing with optional full-text search. Implement advanced query syntax with boolean operators and wildcards. Add incremental indexing for performance. Include export functionality in JSON and CSV formats. Implement search result highlighting. Add duplicate file detection using checksums. Include performance statistics and progress reporting. Implement concurrent processing for multi-core utilization.

EXPECTED OUTPUT

Format
code

SUCCESS CRITERIA

  • Build a high-performance file system indexer and search tool in Go.
  • Implement recursive directory traversal with configurable depth.
  • Add file metadata extraction including size, dates, and permissions.
  • Include content indexing with optional full-text search.
  • Implement advanced query syntax with boolean operators and wildcards.
  • Add incremental indexing for performance.
  • Include export functionality in JSON and CSV formats.
  • Implement search result highlighting.
  • Add duplicate file detection using checksums.
  • Include performance statistics and progress reporting.
  • Implement concurrent processing for multi-core utilization.

FAILURE MODES

  • May implement sequentially instead of concurrently.
  • May omit incremental indexing or duplicate detection.
  • May not achieve high performance due to inefficient traversal or indexing.

CAVEATS

Missing context
  • Target operating systems (e.g., cross-platform, Linux-only).
  • Storage backend for index (e.g., SQLite, Bleve, in-memory).
  • CLI interface details (flags, commands, usage examples).
  • Configuration method (CLI flags, YAML file).
  • Supported file types and exclusions (e.g., binaries, images).
  • Performance targets or benchmarks.
  • Testing and error handling requirements.
Ambiguities
  • Unclear what 'configurable depth' exactly means (e.g., max recursion level, exclusion patterns).
  • 'Content indexing with optional full-text search' does not specify supported file types or encoding handling.
  • 'Advanced query syntax with boolean operators and wildcards' lacks examples or precise grammar.
  • 'Incremental indexing' undefined: how to track changes (e.g., timestamps, hashes)?
  • 'Export functionality' ambiguous: export what (index, results)? Full schema?
  • 'Search result highlighting' not specified: context snippets, term bolding?
  • 'Duplicate file detection using checksums' omits checksum algorithm (MD5, SHA) and scope (whole FS or per search).

QUALITY

OVERALL
0.60
CLARITY
0.85
SPECIFICITY
0.65
REUSABILITY
0.20
COMPLETENESS
0.55

IMPROVEMENT SUGGESTIONS

  • Add a section defining the CLI interface with example commands and flags.
  • Provide query syntax examples, e.g., 'file:*.txt AND (author:john OR size>1MB)'.
  • Specify index storage, e.g., 'Use Bleve for full-text search indexing'.
  • Define incremental strategy, e.g., 'Track file mtimes and checksums for changes'.
  • Include output formats schemas for JSON/CSV exports.
  • Add requirements for logging, error handling, and unit tests.
  • List dependencies or prefer standard library where possible.

USAGE

Copy the prompt above and paste it into your AI of choice — Claude, ChatGPT, Gemini, or anywhere else you're working. Replace any placeholder sections with your own context, then ask for the output.

MORE FOR DEVELOPER