Advanced Search
Papra supports advanced search queries with filters, logical operators, and grouping to help you find documents efficiently.
Basic full text search
Section titled “Basic full text search”A simple search query like foobar will search across both document names and content:
# Search documents where name or content containsfoobar
# This is equivalent toname:foobar OR content:foobarFull text search can be combined with filters for more precise results.
# Search documents with tag invoice and containing foobartag:invoices foobarFilters
Section titled “Filters”Use filters to search specific document properties. Current supported filters:
name:- Search in document namescontent:- Search in document contenttag:- Search by tag name or IDcreated:- Filter by document creation datehas:tags- Check if documents have any tags, it can be negated with-has:tagsorNOT has:tagsto find untagged documents
Filter Examples
Section titled “Filter Examples”# Finds documents whose name contains "invoice"name:invoice
# Finds documents with "financial report" in their content# use quotes for phrases with spacescontent:"financial report"
# Finds documents tagged with "urgent"tag:urgent
# Finds documents created after January 1st, 2024created:>2024
# Finds documents that have at least one taghas:tags
# Finds documents without any tags-has:tagsExistence Filter
Section titled “Existence Filter”The has: filter checks whether documents have certain properties:
has:tags- Documents with at least one tag-has:tagsorNOT has:tags- Documents without any tags
Existence Filter Examples
Section titled “Existence Filter Examples”# Find all untagged documents-has:tags
# Find tagged invoiceshas:tags invoice
# Find untagged documents from 2024-has:tags created:>=2024
# Find tagged documents that are not archivedhas:tags NOT tag:archivedDate Filter
Section titled “Date Filter”The created: filter supports date comparisons with the following operators:
=- Exact date match>- After the date>=- On or after the date<- Before the date<=- On or before the date
Date Format
Section titled “Date Format”Dates can be specified in various formats, including:
- Only year:
YYYY(interpreted as January 1st of that year) - Month and year:
YYYY-MM(interpreted as the first day of that month) - Common formats:
YYYY/MM/DD,YYYY.MM.DD,Month DD, YYYY, etc. - ISO 8601:
YYYY-MM-DD,YYYY-MM-DDTHH:MM:SSZ, etc.
Invalid date formats will be ignored in the search query.
Date Filter Examples
Section titled “Date Filter Examples”# Finds documents created exactly on January 15th, 2024 at 00:00:00created:2024-01-15
# Finds documents created after January 1st, 2024created:>2024
# Finds documents created on or after January 1st, 2024created:>=2024-01-01
# Finds documents created before December 31st, 2024created:<2024-12-31
# Finds documents created on or before June 30th, 2024created:<=2024-06-30
# Finds invoices created only in 2024tag:invoice created:>2024 created:<2025Logical Operators
Section titled “Logical Operators”Combine filters using logical operators (case-insensitive):
AND- Both conditions must matchOR- Either condition must matchNOT(or-) - Negates the condition
Operator Examples
Section titled “Operator Examples”name:invoice AND tag:paidFinds invoices that are tagged as paid
content:contract OR content:agreementFinds documents containing “contract” or “agreement”
tag:important NOT tag:archivedFinds important documents that are not archived
Negation
Section titled “Negation”Negate filters using either - prefix or NOT operator:
# Both equivalent-tag:archivedNOT tag:archivedBoth find documents that are not tagged with “archived”
Grouping
Section titled “Grouping”Use parentheses (...) to group expressions and control precedence:
(name:invoice OR name:receipt) AND tag:2024Finds documents from 2024 that are either invoices or receipts
tag:important AND (tag:client-a OR tag:client-b)Finds important documents for client-a or client-b
Quoted Values
Section titled “Quoted Values”Use double quotes to search for phrases with spaces:
content:"quarterly financial report"name:"Budget 2024"Implementation Notes
Section titled “Implementation Notes”The search functionality is built using:
- Custom parser in the
@papra/search-parserpackage - SQLite FTS5 (Full-Text Search) for efficient text matching
- Support for additional filters coming in future updates