Skip to content

feat: add invoice search groundwork#112

Merged
Cedarich merged 2 commits intoZyntariHQ:mainfrom
Christopherdominic:feat/invoice-search
Mar 9, 2026
Merged

feat: add invoice search groundwork#112
Cedarich merged 2 commits intoZyntariHQ:mainfrom
Christopherdominic:feat/invoice-search

Conversation

@Christopherdominic
Copy link
Copy Markdown
Contributor

  • Adds merchant-scoped GET /invoices/search endpoint using the new SearchInvoicesDto for query validation and limit clamping.

  • Implements InvoicesService.searchInvoices() with full-text GIN matching, trigram similarity, and ILIKE fallbacks, plus helper utilities (buildTsQuery, escapeLikePattern) for safe PostgreSQL queries.

  • Introduces pg_trgm extension + the necessary full-text and trigram indexes via migration 20260308090000_invoice_search_indexes.

  • Extends the unit suite (invoices.service.spec.ts) to cover the search workflow and authorization handling.
    closes Lightning-fast invoice search (PostgreSQL GIN index + trigram) #108

@Cedarich
Copy link
Copy Markdown
Contributor

Cedarich commented Mar 8, 2026

@Christopherdominic please fix build

@Christopherdominic
Copy link
Copy Markdown
Contributor Author

Christopherdominic commented Mar 8, 2026

@Cedarich fixed

@Cedarich Cedarich merged commit f0f9b01 into ZyntariHQ:main Mar 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lightning-fast invoice search (PostgreSQL GIN index + trigram)

2 participants