Search

Find anything, instantly

OpenSearch-backed full-text search with metadata facets, tag filtering, and OCR-powered document search — available out of the box with no search infrastructure to manage.

Full-text search

OpenSearch 2.x powers BM25 full-text search across file names, custom metadata fields, and OCR-extracted text. Queries support wildcards, fuzzy matching, phrase queries, and field boosting — all via a single `q` parameter.

Faceted filtering

Narrow results by metadata fields, tags, MIME type, date range, processing status, or legal-hold state. Facets are declared per project so end users see only the filters relevant to their document type.

Tag-based retrieval

Tags are first-class indexed fields. A single document can carry unlimited tags. Tag aggregations let you build 'grouped by tag' views without additional API calls.

OCR document search

The OCR processing stage sends extracted text to the OpenSearch indexer after upload. Scanned PDFs and images are immediately searchable without any client-side OCR or text extraction — FileNest does it in the pipeline.

Semantic search (Phase 7)

Vector embeddings stored in pgvector enable similarity search: 'files like this one' or natural-language queries across document content. Embeddings are generated in the AI Embedding processing stage and synced to the vector index.

Real-time indexing

Files are indexed by the NATS `file.uploaded` and `file.processed` events — no polling required. Index updates propagate within seconds of upload completion. Deletions and metadata updates trigger incremental re-index.

// Search from the browser — zero config
import { useSearch } from '@filenest/react';

function DocSearch() {
  const { results, facets, totalCount, search } = useSearch({
    debounceMs: 300,
    facets: ['documentType', 'tags'],
  });

  return (
    <>
      <input onChange={e => search({ q: e.target.value })} placeholder="Search…" />
      <p>{totalCount} results</p>
      {results.map(f => <div key={f.id}>{f.filename}</div>)}
    </>
  );
}