Smart Systems Guide: Smart Search, Smart 404 & Smart Related Posts
The TanaFlows theme features an intelligent system of interactive capabilities: Smart Search, Smart 404 (Intelligent Error Handling), and Smart Related Posts.
The highlight of this system is its tightly integrated architectural design: All three features share a single search index that is loaded only once and cached in the browser. This mechanism achieves 100% network efficiency and offers instant results for users.
1. Smart Search
- Feature: Allows readers to find articles instantly as they type (Instant Search).
- Smart Elements:
- Fuzzy Search: Automatically handles typos, accented or non-accented text, and related phrases.
- Language-Aware: Only shows articles matching the website’s current language (prevents English articles from showing up when browsing the Vietnamese version).
- Performance: Because the index is pre-loaded and cached in the browser, search results appear instantly as the user types without any network latency.
2. Smart 404 (Intelligent Error Handling)
When readers land on a non-existent page (e.g., due to an old broken link or a mistyped URL), instead of showing a generic, unhelpful error screen, the system automatically attempts to retain them using a smart suggestion algorithm:
- Relationship to Smart Search: Smart 404 uses the same search index database as Smart Search.
- How it Works:
- The system captures the broken URL slug from the browser address bar.
- It parses the slug into key terms (e.g.,
domain.com/tana-guide/→tana,guide). - It runs these terms through the Smart Search fuzzy algorithm to scan all real articles published on the website.
- It automatically recommends the 3 most relevant articles matching the broken URL and displays them under the message: “Did you mean to visit one of these pages?”. Readers can click to continue reading rather than leaving your site.
3. Smart Related Posts
The related posts section at the bottom of each article encourages readers to stay longer on your site (increasing Time on Site). TanaFlows applies a multi-tier matching algorithm with descending priority:
- Tier 0: Manual Keywords (If configured): If you wish to pin specific related articles, you can input a manual list of keywords in the post. The system prioritizes matching posts containing these keywords first.
- Tier 1: Slug-based Matching (Highest automatic priority): The system parses the current article’s slug into keywords, then scans the site to find articles with similar keywords in their slugs (e.g., an article with the slug
tana-basic-guidewill prioritize posts with slugs containingtanaorbasic). - Tier 2: Title-based Matching: If Tier 1 doesn’t find enough matches, the fuzzy search algorithm compares the current article’s title (or SEO Title) with other articles to find semantic relevance.
- Tier 3: Tag-based Matching (Fallback): If the list is still not full (up to 6 articles), the system looks for articles sharing the same public tags as the current article, ordered by tag priority.
- De-duplication Filter: The system automatically excludes the currently read article from the results, ensuring that the recommended posts are diverse and accurate.
4. Architectural Benefits
- Lightning-Fast Loading: You don’t need to load separate scripts or plugins for each feature. All three share a lightweight, unified core processor.
- Bandwidth Efficient: Queries the Ghost API exactly once for all three features, minimizing server load.
- Seamless User Experience: Searching, browsing recommendations, and recovering from broken links happen instantly, naturally, and intelligently.