Search modes
SQL search
Exact pattern matching directly against the database. Slower but always current.
Full-text search
Fast indexed search using LNX, Meilisearch, or Typesense. May have slight data lag.
SQL search
SQL search queries the archive database directly for exact matches:Features
- Always current: Searches live database with no indexing delay
- Exact matching: Finds precise text patterns in posts
- Multi-board support: Configurable single or multi-board searches
- Per-board results: When searching multiple boards, results are paginated per board
Search fields
Text fields
Text fields
- Comment: Search within post text
- Subject: Search within post subjects/titles
- OP Comment: Find posts in threads where the opening post matches
- OP Subject: Find posts in threads with matching OP subjects
- Tripcode: Search by poster tripcode
- Filename: Search by original media filename
Numeric filters
Numeric filters
- Post Number: Find specific post by ID
- Comment Length: Filter by comment character count (
>,<,=,>=,<=) - Subject Length: Filter by subject character count
- Media Dimensions: Filter by image/video width and height
Boolean filters
Boolean filters
- Has File / No File: Filter by media attachment
- Is OP / Not OP: Filter opening posts vs replies
- Is Deleted / Not Deleted: Filter deleted posts
- Is Sticky / Not Sticky: Filter pinned threads
Date range
Date range
- Date After: Posts on or after this date
- Date Before: Posts on or before this date
Usage
Enter search terms
Fill in any combination of search fields. All specified filters are combined with AND logic.
SQL search has configurable result limits per page. Default maximum is defined in
config.toml under vanilla_search.hits_per_pageFull-text search (FTS)
FTS provides much faster searches using a dedicated search engine:Supported engines
LNX
Fully supported and tested. Based on Tantivy. Best performance.
Meilisearch
Partial support. Easy setup with good performance.
Typesense
Partial support. Fast with typo tolerance.
Query syntax
FTS supports advanced query operators:Advanced syntax
Advanced syntax
Full syntax support depends on the search engine used. LNX provides:
- Phrase queries with quotes
- Boolean operators: AND, OR, NOT
- Required/excluded terms: +term, -term
- Field-specific searches
- Wildcard patterns
Search features
All the same search fields from SQL search are available, plus:- Highlighting: Search terms are highlighted in results (configurable)
- Faster results: Pre-indexed data returns results in milliseconds
- Typo tolerance: Some engines support fuzzy matching
- Relevance ranking: Results are scored by relevance
Setting up FTS
The initial index load can take time depending on archive size. Progress bars show loading status.
Gallery mode
Both search modes support gallery mode for media-focused browsing:Gallery mode automatically enables the “Has File” filter
Search plugins
Ayase Quart supports custom search plugins to extend functionality:Plugin capabilities
- Add custom search fields to the form
- Pre-filter results before native search
- Integrate external data sources
- Implement custom search logic
Using plugins
Plugins are automatically detected and loaded from:src/ayase_quart/plugins/search/
search_example.py for a template plugin implementation.
Plugin limitations
Plugin limitations
Search plugins face a “post-filtering” challenge:Since plugin filtering happens before native search filtering (for reported posts, deleted posts, etc.), final page sizes can be unpredictable. Plugin results must go through a second round of filtering, which may reduce the number of results below the requested page size.Plugin developers should:
- Return more results than
hits_per_pagewhen combined with native filters - Document this behavior for users
- Consider returning 2-3x the page size for complex filters
Result display
Search results show:Standard mode
- Post metadata: Number, timestamp, board, thread
- Post content: Subject and comment with formatting
- Media: Thumbnails with click-to-view full size
- Thread context: Link to view post in original thread
- Quotelinks: Clickable references preserved
- Highlighting: Search terms highlighted in text (FTS only, if enabled)
Gallery mode
- Grid of media thumbnails
- Click to view full size
- Link to source thread
- Media metadata on hover
Pagination
Search results are paginated for performance:- Configurable results per page
- Page navigation controls
- Total hit count displayed
- Current page indicator
- Direct page number links
Page size limits are configured per search mode in
config.tomlPerformance considerations
SQL search performance
- Slower for large archives (millions of posts)
- Performance depends on database indexes
- Consider for small archives or when FTS isn’t available
- Results are always current with no lag
FTS performance
- Very fast even on large archives
- Requires separate search engine infrastructure
- Index updates may lag behind scraper by minutes
- Memory requirements depend on index size
For production deployments with large archives, FTS is strongly recommended
Rate limiting
Search endpoints are rate limited to prevent abuse:- FTS: 5 requests per minute per IP
- SQL: Configurable limits
API access
Search is also available via API (if enabled):- Same search parameters as web interface
- JSON response format
- Requires API authentication token
- See API documentation for endpoint details
- Search handler:
src/ayase_quart/blueprints/web/bp_search.py:24 - FTS endpoint:
src/ayase_quart/blueprints/web/bp_search_fts.py:18 - Query builder:
src/ayase_quart/search/query.py:12