Troubleshooting - Common search issues and solutions.
Search Modes
Basic Search (Free)
What it searches: File and folder names only
Use when: You know the filename or part of it
Example: Searching "budget" finds "Budget_2024.xlsx"
How it works:
Searches file and folder names using metadata.
Fast and efficient (typically < 1 second).
Available on all cloud services.
No subscription required.
Full-Text Search (Premium)
What it searches: File contents AND filenames
Use when: You remember what's inside a file but not its name
Example: Searching "quarterly revenue" finds files containing that phrase
Status: Implemented behind runtime rollout flags
Availability: Pro and Unlimited plans when AI_SEARCH_ENABLED and the provider-specific AI flags are enabled
What it searches: Indexed semantic chunks plus keyword fallback results
Use when: You want meaning-aware results over supported indexed files
Example: "Find the deployment rollback notes" can match a document that discusses release recovery even if the exact words differ
Developer reference:AI Search Architecture
Implemented Features:
Runtime-gated semantic search for Google Drive, OneDrive, and Dropbox.
Account and folder scoped AI indexing with visible progress.
Deterministic PDF text extraction for PDFs that contain embedded text.
Deterministic DOCX text extraction for DOCX files with extractable plain text.
Deterministic XLSX text extraction for visible worksheets with extractable cell values.
Deterministic PPTX text extraction for non-hidden slides and speaker notes.
Export-based Google Workspace indexing for Google Docs, Sheets, Slides, and Drawings.
Opt-in local OCR for standalone PNG/JPEG images when AI_SEARCH_OCR_ENABLED=true.
Durable indexing diagnostics with per-job progress, extraction method breakdowns, error taxonomy, retryability guidance, and file-level status.
Hybrid semantic and keyword result merging.
Safe keyword fallback when semantic infrastructure is unavailable.
Ask AI responses that return only citation-backed answers when RAG is enabled.
Current Status:
AI search infrastructure is disabled by default. Internal rollout requires AI_SEARCH_ENABLED=true, configured embedding and vector backends, and at least one provider flag such as AI_SEARCH_GOOGLE_DRIVE_ENABLED=true. Indexing is intentionally limited to deterministic formats in v1: plain text, Markdown/MDX, source code, JSON/YAML/XML/CSV/TSV/HTML/SVG, similar explicit text-like allow-list entries, PDFs that contain extractable embedded text, DOCX files with extractable text, XLSX spreadsheets with extractable visible cell values, PPTX presentations with extractable slide text and speaker notes, standalone PNG/JPEG images when OCR is enabled, and Google Workspace files exported from Google Drive before extraction. Google Docs export to DOCX, Google Sheets export to XLSX, Google Slides export to PPTX, and Google Drawings export to PDF. Exported bytes are not cached; each indexing run exports fresh content, enforces the configured extraction byte limit on exported content, and preserves the original Workspace file metadata for indexed chunks.
OCR is disabled by default and is controlled by the AI-search namespaced flag AI_SEARCH_OCR_ENABLED. When enabled, standalone PNG/JPEG files are processed by the local tesseract.js provider with the configured timeout, confidence threshold, and image/page limits. OCR adds indexing latency and accuracy varies with image quality, language, resolution, and layout. OCR output may include recognition errors that affect semantic search quality.
PDF indexing does not render pages for OCR in Phase 6A because safe Node PDF rasterization would require additional native canvas dependencies and Fly.io/Vercel deployment validation. Scanned PDFs, Google Drawings exported as image-only PDFs, and PDFs with no embedded text therefore remain unsupported with a renderer-unavailable reason when OCR is enabled. DOCX indexing uses mammoth.extractRawText for plain text extraction, preserving paragraph breaks and basic reading order where Mammoth provides it. Legacy .doc, password-protected/encrypted documents, embedded image extraction, OCR, charts, SmartArt, complex formatting preservation, tracked-change/comment metadata, RTF, ODT, and broad Office parsing remain unsupported. Empty DOCX files produce empty extractor output and are skipped as no-text items; corrupt DOCX files fail with extraction_docx_parse_failed, and encrypted DOCX files fail or skip with extraction_docx_encrypted. XLSX indexing reads visible worksheets in workbook order, prefixes each non-empty sheet with a --- Sheet: SheetName --- delimiter, joins non-empty cell values row by row with tabs, uses cached/displayed formula results when present, and does not index formula syntax. Empty XLSX files skip with extraction_xlsx_no_text, corrupt or timed-out XLSX extraction fails with extraction_xlsx_parse_failed, and encrypted XLSX skips or fails with extraction_xlsx_encrypted; all messages are sanitized. PPTX indexing reads slide order from ppt/presentation.xml, follows presentation relationships to each slide, emits non-empty slides as Slide N: blocks in presentation order, and follows slide relationships to extract speaker notes from identifiable notes-body placeholders. Hidden PPTX slides are skipped when the slide root reliably marks show="0" or show="false"; if a producer stores hidden state elsewhere, the slide may still be extracted. Empty PPTX files skip with extraction_pptx_no_text, encrypted PPTX files skip with extraction_pptx_encrypted, and corrupt, malformed, or timed-out PPTX parsing fails with extraction_pptx_parse_failed; all PPTX taxonomy messages are sanitized and do not expose raw XML, raw parser details, file paths, stack traces, or slide text. Google Forms, Sites, Maps, Jamboard, Apps Script, Shortcuts, third-party Drive app files, legacy .xls, legacy .ppt, ODP, Keynote, ODS, Numbers, other Office formats, media, archives, charts, SmartArt, images, macros, embedded presentation media, animations, transitions, speaker timings, OCR-only PDF content, master slide/layout template text, image alt text, GIF, TIFF, BMP, WebP, HEIC, cloud OCR providers, OCR caching, preprocessing, handwriting guarantees, complex table structure extraction, form field detection, mathematical equation extraction, and other binary formats remain unsupported without indexing raw bytes.
PPTX extraction is a narrow server-side OpenXML path, chosen over generator-oriented or broad document-parser packages to keep production behavior deterministic and sanitized. It uses jszip under the package's MIT license option and fast-xml-parser under MIT; both provide TypeScript types and work in the Vitest and Next.js server build paths without external Office binaries.
Google Workspace export uses the Google Drive files.export() path for the source account and a configurable default 30 second export timeout. Permission, quota, network/provider, timeout, unsupported-type, and invalid-provider failures fail the individual indexing item with sanitized messages and stable taxonomy codes. Export network, quota/permission, and timeout failures are retryable; unsupported Workspace types and invalid-provider requests are not retryable. Successful exports that contain no extractable text are skipped as unsupported. Unsupported Google Workspace types include Forms, Sites, Maps, Fusion Tables, Jamboard, Apps Script, Shortcuts, and third-party Drive app files.
AI indexing records durable item-level telemetry for diagnostics: processing stage, extraction method, timing, text length, token/chunk counts, embedding and semantic-upsert timings, OCR metadata, and sanitized taxonomy codes. Before discovery, indexing verifies that the configured semantic index backend can bootstrap its collection; if that backend is unavailable, the run fails fast with a semantic-index failure reason instead of marking every eligible file failed. /user/ai-indexing exposes a compact health summary and a diagnostics dialog with progress, ETA when enough throughput data exists, method and error breakdowns, retryable/non-retryable counts, latency percentiles, unsupported file-type groups, and capped affected-item samples using authorized file names from user-owned rows. Health percentages use eligible-file coverage while unsupported-by-policy files are counted separately. The Properties dialog can show current indexing status for a single file when the file browser already has service/account/resource identity. Diagnostics avoid raw provider paths, extracted text, stack traces, OAuth tokens, and raw provider errors.
Search Behavior by Service
Google Drive ⭐⭐⭐⭐⭐
Feature
Basic Search
Full-Text Search
Speed
Very Fast (< 1s)
Fast (1-3s)
Accuracy
Excellent
Excellent
File Types
All
30+ types
Limitations
None
None
Strengths:
✅ Fastest search across all services.
✅ Excellent full-text indexing.
✅ Supports all file types.
✅ No API limitations.
OneDrive ⭐⭐⭐⭐
Feature
Basic Search
Full-Text Search
Speed
Fast (< 1-3s)
Variable (3-30s)
Accuracy
Excellent
Good
File Types
All
Limited for MSA accounts
Limitations
None
MSA account restrictions
Strengths:
✅ Fast filename search (optimized with 3-tier strategy).
✅ Good full-text search for business accounts.
✅ Reliable metadata search.
Known Issues:
⚠️ Personal Accounts (MSA): Limited content indexing for code/config files.
⚠️ First Search: May be slower due to indexing (mitigated with optimization).
ℹ️ This is a Microsoft API limitation, not a bug in our implementation.
⚠️ Full-text search limited to specific file types.
Recommendations for Users
When to Use Basic Search:
✅ You know the filename or part of it.
✅ You want fast results.
✅ You're searching for folders.
✅ You're on a free plan.
When to Use Full-Text Search:
✅ You remember content but not the filename.
✅ You're searching for specific phrases or keywords.
✅ You need comprehensive results.
✅ You have a premium subscription.
Best Practices:
Start with Basic Search - It's faster and often sufficient
Use specific keywords - More specific = better results
Try different variations - "budget" vs "Budget_2024"
Check file types - Some services have limitations
Be patient on first search - Indexing may take time
First Search Info Banner
Purpose
Provides users with context about potentially slower first searches due to server-side initialization processes like indexing, caching, and service authentication.
src/app/api/search/enhanced/route.ts - Search API with OneDrive implementation.
src/services/OneDriveService.ts - OneDrive service implementation.
src/hooks/useBannerDismissal.ts - Banner dismissal state management.
OneDrive Search Performance Optimization
Date: October 2025
Status: ✅ Implemented and Deployed
Performance Improvement: 10-30x faster for typical filename searches
Problem Statement
OneDrive's first search was extremely slow, often taking 10-30 seconds or more to return results. This was caused by OneDrive's /me/drive/root/search(q='...') endpoint triggering full-text content indexing even when users only wanted to search filenames.
Root Cause Analysis
The original implementation used OneDrive's standard search endpoint: