-
Notifications
You must be signed in to change notification settings - Fork 15
Cross Bucket Search
This guide covers the comprehensive cross-bucket search feature in R2 Bucket Manager, allowing you to search for files across all buckets simultaneously with powerful filtering options.
Cross-Bucket Search enables you to find files across your entire R2 infrastructure from a single interface. Instead of navigating to individual buckets, you can search all buckets in parallel, apply advanced filters, and perform file operations directly from the search results.
- Multi-Bucket Search - Search across all your R2 buckets simultaneously
- Real-time Search - Debounced search activates automatically as you type (300ms)
- Advanced Filters - Combine multiple filter types (extension, size, date)
- Sortable Results - Click column headers to sort by filename, bucket, size, or date
- Full File Operations - Download, move, copy, or delete files directly from results
- Server-Side Performance - Parallel queries across all buckets for optimal speed
- Result Limiting - Returns up to 100 matching files per search (configurable)
- Navigate to the R2 Bucket Manager main page (bucket list view)
- Look for the "🔍 Search Across All Buckets" button at the top of the page
- Click the button to expand the search interface
The search interface includes:
- Search Input - Text field for entering your search query
- Filter Buttons - Extension, Size, and Date filter controls
- Active Filters Display - Shows all currently applied filters
- Results Table - Displays matching files with sortable columns
- Control Buttons - "Clear All" to reset filters and collapse
- Type your query in the search input field
- View results automatically - Search executes with a 300ms debounce after you stop typing
- Refine your search - Modify your text to narrow results
- Clear search - Click the ✕ button next to the search input or use "Clear All"
- Case-insensitive - "Report", "report", and "REPORT" all match the same files
- Filename matching - Searches filename only, not full paths
- Real-time updates - Results update instantly as you type
- Partial matching - "report" matches "monthly-report.pdf", "Q4-Report.xlsx", etc.
| Query | Matches |
|---|---|
report |
monthly-report.pdf, Q4_Report.xlsx, sales_report_2024.csv |
backup |
backup-2025.tar.gz, system_backup.zip |
invoice |
invoice_001.pdf, 2025-invoice-template.docx |
Filter files by their file type using quick presets or custom selection.
Click one of these buttons for instant filtering:
- 📷 Images - .jpg, .png, .gif, .webp, .svg, .bmp, .heic, .avif
- 📄 Documents - .pdf, .doc, .docx, .xls, .xlsx, .ppt, .pptx, .txt, .csv
- 🎬 Videos - .mp4, .mov, .webm, .avi, .mkv, .flv, .m4v, .wmv
- 💻 Code - .js, .ts, .py, .java, .go, .rust, .html, .css, .json
- 📦 Archives - .zip, .rar, .tar, .gz, .7z, .bz2, .xz
- Click the "Extension" filter button
- Select individual extensions from the available list
- Select multiple extensions to combine filters (e.g., .jpg AND .png)
- See file counts next to each extension
- Click an extension again to deselect it
- Active extensions appear as removable badges below the filter buttons
- Click the ✕ on any badge to remove that extension from the filter
- Badge shows format:
.jpgorImages (4)with count
Filter files by their storage size using preset ranges or custom values.
Click one of these buttons for quick filtering:
| Range | Size |
|---|---|
| < 1 MB | 0 - 1,048,576 bytes |
| 1 - 10 MB | 1 - 10 MB |
| 10 - 50 MB | 10 - 50 MB |
| 50 - 100 MB | 50 - 100 MB |
| > 100 MB | 100 MB and above |
- Click the "Size" filter button
- Select "Custom Range" option
- Enter Minimum size (in MB) or leave blank for no minimum
- Enter Maximum size (in MB) or leave blank for no maximum
- Click Apply to filter results
- Active size filter appears as a removable badge below the filter buttons
- Badge shows format:
Size: 10-50 MBorSize: Custom - Click the ✕ on the badge to remove the size filter
- Find small files (< 1 MB) that are quick to download
- Locate large video files (> 100 MB) consuming storage
- Identify medium-sized documents (1-10 MB) for backup
- Search for specific size ranges in your bucket structure
Filter files by their upload date using preset ranges or custom dates.
Click one of these buttons for quick filtering:
| Range | Time Period |
|---|---|
| Today | Last 24 hours |
| Last 7 Days | Past week |
| Last 30 Days | Past month |
| Last 90 Days | Past quarter |
| This Year | Current calendar year |
- Click the "Date" filter button
- Select "Custom Range" option
- Click "From Date" to select start date
- Click "To Date" to select end date
- Use the calendar picker to navigate and select dates
- Click Apply to filter results
- Active date filter appears as a removable badge below the filter buttons
- Badge shows format:
Date: TodayorDate: 2025-01-01 to 2025-01-31 - Click the ✕ on the badge to remove the date filter
- Filters based on when files were uploaded to R2
- Respects timezone of the R2 bucket
- Useful for finding recent uploads or archived content
- Helps identify files from specific project phases
You can combine multiple filter types simultaneously for precise results:
Example 1: Find recent images
- Enter text search:
product - Apply Extensions filter: Images (📷)
- Apply Date filter: Last 7 Days
- Result: All product images uploaded in the last week
Example 2: Find large documents
- Enter text search:
report - Apply Extensions filter: Documents (📄)
- Apply Size filter: 50 - 100 MB
- Result: All reports between 50-100 MB in size
Example 3: Find code files
- No text search (leave empty for all files)
- Apply Extensions filter: Code (💻)
- Apply Size filter: < 1 MB
- Apply Date filter: This Year
- Result: All source code files under 1 MB uploaded this year
Filters work with AND logic:
- A file must match ALL active filters to appear in results
- If no files match all criteria, results will be empty
- Remove filters one by one to broaden your search
- Clear individual filter - Click the ✕ on any badge below the filter buttons
- Clear all filters - Click the "Clear All" button at the top right of the search section
- Collapse search - Click "Clear All" to collapse the search interface
Results are displayed in a sortable table with the following columns:
| Column | Information |
|---|---|
| Filename | Name of the file found |
| Bucket | R2 bucket containing the file (clickable) |
| Size | File size in human-readable format (B, KB, MB, GB) |
| Upload Date | Date and time file was uploaded to R2 |
Click column headers to sort results:
- First click - Sort ascending (A→Z or 0→9)
- Second click - Sort descending (Z→A or 9→0)
- Third click - Remove sort (return to default order)
| Action | Result |
|---|---|
| Click Filename | Files sorted alphabetically |
| Click Bucket | Files grouped by bucket name |
| Click Size | Files sorted by size (small→large) |
| Click Upload Date | Files sorted by date (oldest→newest) |
- Results show up to 100 files per search
- If more than 100 results exist, only first 100 are displayed
- Modify filters to narrow results if needed
- Click bucket badge to navigate to that specific bucket
You can perform the following operations on files found in search results:
- Locate the file in the results table
- Click the "Download" button for that file
- File downloads directly to your computer
- Uses signed URLs for secure downloads
- Locate the file in the results table
- Click the "Move" button for that file
- Select destination bucket and folder in the modal
- Click Confirm to move
- File is moved from source bucket to destination
- Search results refresh automatically
- Locate the file in the results table
- Click the "Copy" button for that file
- Select destination bucket and folder in the modal
- Click Confirm to copy
- File is copied (original remains in source bucket)
- Search results refresh automatically
- Locate the file in the results table
- Click the "Delete" button for that file
- Confirm the deletion in the modal
- File is permanently deleted
- Search results update to remove deleted file
- Click the bucket badge next to any filename
- Navigate directly to that bucket's file browser
- Leave search interface and view full bucket contents
Cross-bucket search uses parallel server-side queries:
- Searches across all buckets simultaneously
- Returns results in seconds even with many buckets
- No client-side filtering delays
- Optimized for buckets with thousands of files
- Use specific search terms - "report" is faster than "r"
- Combine filters - Filters reduce result set before returning to client
- Sort appropriately - Click headers to organize results as needed
- Limit searches - Results capped at 100 files for performance
- Max results: 100 files per search (configurable)
- Search timeout: Results return within seconds
- Filter impact: Filters applied server-side before returning results
GET /api/search
| Parameter | Type | Description | Example |
|---|---|---|---|
query |
string | Search term (filename match) | query=report |
extensions |
string | Comma-separated extensions | extensions=.jpg,.png |
minSize |
number | Minimum file size in bytes | minSize=1048576 |
maxSize |
number | Maximum file size in bytes | maxSize=104857600 |
startDate |
string | Start date (ISO 8601) | startDate=2025-01-01 |
endDate |
string | End date (ISO 8601) | endDate=2025-12-31 |
limit |
number | Max results to return | limit=50 |
curl "http://localhost:8787/api/search?query=report&extensions=.pdf,.docx&minSize=1048576&maxSize=104857600"{
"success": true,
"results": [
{
"filename": "monthly-report.pdf",
"bucket": "documents-bucket",
"size": 2097152,
"uploadDate": "2025-01-15T10:30:00Z"
},
{
"filename": "Q4_Report.docx",
"bucket": "archives-bucket",
"size": 5242880,
"uploadDate": "2025-01-20T14:45:00Z"
}
],
"count": 2,
"totalMatched": 2
}{
"success": false,
"error": "Search query is required",
"statusCode": 400
}Scenario: You manage multiple project buckets and need to find all marketing materials.
Solution:
- Search for:
marketing - Filter by: Documents + Images (multi-select extensions)
- Result: All marketing files across all buckets instantly visible
- Take action: Download, move to archive bucket, or organize by date
Scenario: Your storage is filling up and you need to identify what's consuming space.
Solution:
- Leave search empty (search for everything)
- Filter by: Size > 100 MB
- Sort by: Size (descending)
- Result: All large files ranked by size
- Take action: Download for backup or delete old files
Scenario: Team uploaded files today and you need to verify they arrived.
Solution:
- Leave search empty or search for team member name
- Filter by: Date - Today
- Result: All files uploaded today
- Take action: Verify, move to appropriate bucket, or download
Scenario: Need to backup all documents from before a certain date.
Solution:
- Leave search empty (all files)
- Filter by: Documents (📄) extensions
- Filter by: Date range (before backup date)
- Download selected files or entire buckets
- Store in secure backup location
Scenario: Migrating project files to a new bucket structure.
Solution:
- Search for project-related files across multiple old buckets
- Apply date filters to find files from specific project phase
- Use Move operation to reorganize into new bucket structure
- Use Copy to create redundancy during migration
✅ DO:
- Use descriptive search terms
- Combine multiple filters for precise results
- Sort results to organize findings
- Navigate to buckets for bulk operations
❌ DON'T:
- Search for very common terms (e.g., single letters) as this may return many results
- Use full paths in search (search by filename only)
- Perform too many simultaneous searches (wait for one to complete)
✅ DO:
- Use preset date ranges for quick filtering
- Combine extension filters for multiple file types
- Use custom size ranges for storage analysis
- Clear filters when changing search strategy
❌ DON'T:
- Leave all filters empty and expect meaningful results
- Use extremely broad date ranges when you need specificity
- Forget to clear old filters before new searches
✅ DO:
- Use specific search terms for faster results
- Apply filters to reduce result set size
- Use bucket navigation for bulk file operations
- Check results limit if search seems incomplete
❌ DON'T:
- Search for very broad terms on buckets with millions of files
- Attempt to download 100+ files individually (use bulk download instead)
- Leave search interface open when not in use
Problem: Search returns no results even though you expect files to match.
Solutions:
- Verify search term spelling
- Try a broader search term
- Remove filters one at a time to find which filter is too restrictive
- Check that files actually exist in accessible buckets
- Ensure date range includes file upload dates
Problem: Search is taking too long or times out.
Solutions:
- Use more specific search terms
- Apply filters to reduce result set
- Check network connection
- Try a simpler search first
- Contact support if consistently slow
Problem: Files from unexpected buckets appear in results.
Solutions:
- Verify your search term matches what you're looking for
- Check if system buckets are hidden (they should be filtered out)
- Review bucket permissions
- Try narrowing with additional filters
Problem: Download, Move, Copy, or Delete buttons don't work.
Solutions:
- Verify you have permission for the operation
- Check that destination bucket exists (for move/copy)
- Ensure file hasn't been deleted since search executed
- Try refreshing the search results
- Check browser console for error messages
- Advanced Filtering - Detailed filtering guide for single buckets
- File Operations - Comprehensive file management guide
- API Reference - Complete API documentation
- Troubleshooting - Additional troubleshooting help
- Home - Documentation overview
- Quick Start Guide - Get up and running in minutes
- Installation & Setup - Complete deployment guide
- Configuration Reference - Environment variables and settings
- Upgrade Guide - Database schema migrations
- Bucket Management - Create, rename, delete buckets
- Object Lifecycles - Automate expiration and IA transitions ⭐ NEW
- Local Uploads - Faster uploads via nearby edge storage ⭐ NEW
- Job History - Track bulk operations with audit trail ⭐ NEW
- Webhooks - Configure HTTP notifications for events ⭐ NEW
- AI Search - Semantic search with Cloudflare AI
- S3 Import - Migrate from AWS S3 to R2 ⭐ NEW
- Cross-Bucket Search - Search across all buckets with filters
- File Operations - Upload, download, move, copy, delete files
- Folder Management - Organize files hierarchically
- Signed URLs & Sharing - Generate secure shareable links
- Advanced Filtering - Filter by extension, size, and date
- Development Guide - Local setup and development workflow
- API Reference - Complete endpoint documentation
- Architecture Overview - Technical stack and design
- Authentication & Security - Zero Trust implementation
- JWT Validation - JWT token validation and verification
- Troubleshooting - Common issues and solutions
- FAQ - Frequently asked questions
- Roadmap - Planned features and enhancements