Searchly Pro Plugin Documentation
Complete guide to using Searchly Pro - AI-Powered WordPress Search
Getting Started
Installation
- Download the Searchly plugin ZIP file
- Go to WordPress Admin → Plugins → Add New
- Click "Upload Plugin" and select the ZIP file
- Click "Install Now" and then "Activate"
Quick Setup
- Get API Key: Go to Searchly Account Dashboard and copy your API key
- Configure API: Navigate to Searchly → API Settings in WordPress admin
- Enter API Key: Paste your API key and click "Save"
- Sync Content: Go to Searchly → Content Sync and click "Sync All Content"
- Add Search: Use shortcode
[searchly]or add via widget
System Requirements
| Requirement | Minimum | Recommended |
|---|---|---|
| WordPress | 6.0 | 6.4+ |
| PHP | 7.4 | 8.0+ |
| MySQL | 5.7 | 8.0+ |
| Memory Limit | 128MB | 256MB+ |
Configuration
API Settings
Navigate to Searchly → API Settings to configure:
API Key
- Enter your Searchly API key from your account dashboard
- Your website will be automatically registered when you save
- Click "Test Connection" to verify the API key works
Auto-Sync Content
- When enabled, posts/pages automatically sync when published or updated
- Recommended: Keep this enabled for real-time search updates
GPT Query Correction
Optional feature to correct misspelled search queries using AI:
Your OpenAI API Key
- Enter your OpenAI API key to use your own GPT (saves Searchly credits)
- Get your key from platform.openai.com/api-keys
- If left empty, Searchly's GPT will be used (deducts credits)
Enable GPT Query Correction
- Check this box to enable AI-powered query correction
- GPT will attempt to correct misspelled or unclear queries
- Note: This uses your OpenAI API key or Searchly credits
Content Sync
Navigate to Searchly → Content Sync to:
- Sync All Content: Manually sync all posts/pages to the API
- Reindex Content: Rebuild the local search index
- Check Index Status: View how many posts are indexed
Shortcodes
Basic Search
[searchly]
Displays a basic search box with default styling.
Custom Search
[searchly algorithm="fuzzy" highlight="yes" placeholder="Search..."]
Available Parameters:
| Parameter | Values | Description |
|---|---|---|
algorithm |
default, fuzzy, exact | Search algorithm to use |
highlight |
yes, no | Highlight search terms in results |
placeholder |
Any text | Placeholder text for search input |
redirect |
yes, no | Redirect to search results page |
Search Icon
[searchly_icon]
Displays a search icon that opens the search box when clicked.
Examples
Example 1: Header Search
[searchly placeholder="Search products..." algorithm="fuzzy"]
Example 2: Full-Width Search
[searchly highlight="yes" redirect="no"]
Example 3: Dark Theme
[searchly class="searchly-dark"]
API Integration
API Endpoints
Searchly uses a RESTful API for search functionality. All requests require an API key.
Base URL
https://app.searchly.pro
Authentication
Include your API key in the request header:
X-API-Key: sk_your_api_key_here
Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/search |
Perform search query |
| POST | /v1/index/bulk |
Bulk index documents |
| POST | /v1/gpt/correct |
GPT query correction |
| GET | /v1/usage/summary |
Get usage statistics |
| GET | /v1/entitlements |
Get plan entitlements |
Search Request Example
POST /v1/search
Content-Type: application/json
X-API-Key: sk_your_api_key
{
"query": "laptop",
"top_k": 10,
"filters": {
"post_type": "product"
}
}
Search Response Example
{
"success": true,
"data": {
"results": [
{
"title": "Laptop Computer",
"url": "https://example.com/product/laptop",
"snippet": "...",
"score": 0.95,
"doc_id": 123
}
],
"credits_charged": 0,
"credits_remaining": 925,
"gpt_used": false
}
}
Features
Core Features
- AI-Powered Search: Fast and accurate search powered by MySQL full-text search
- GPT Query Correction: Automatically corrects misspelled queries using AI
- Real-Time Sync: Content automatically syncs when published or updated
- Analytics: Track searches and clicks to understand user behavior
- Multiple Algorithms: Choose from default, fuzzy, or exact match
- Result Highlighting: Highlight search terms in results
- WooCommerce Support: Full support for product search
Search Algorithms
Default Algorithm
Uses MySQL full-text search with relevance ranking. Best for most use cases.
Fuzzy Algorithm
More lenient matching, finds results even with typos. Good for user-friendly search.
Exact Algorithm
Strict matching, only returns exact matches. Fastest but most restrictive.
GPT Query Correction
When enabled, Searchly can automatically correct search queries:
- Fixes typos and misspellings
- Improves unclear queries
- Uses your OpenAI key or Searchly credits
- Only activates when initial search returns few/no results
Content Indexing
- Automatic indexing of posts, pages, and custom post types
- WooCommerce product support
- Exclude specific posts, categories, or post types
- Manual reindexing available
Analytics
Overview
Searchly provides comprehensive analytics to help you understand how users search your site.
Top Searches
View the most popular search queries on your site:
- See which terms users search for most
- Identify popular content topics
- Find search trends over time
Navigate to Searchly → Analytics → Top Searches
Top Clicked Posts
See which posts get the most clicks from search results:
- Identify your most valuable content
- Understand what users are looking for
- Optimize content based on click data
Navigate to Searchly → Analytics → Top Clicked Posts
Export Analytics
Export your analytics data to CSV for further analysis:
- Click "Export CSV" button in Analytics page
- Download search and click data
- Use in Excel, Google Sheets, or other tools
Troubleshooting
Common Issues
Search Not Working
- Check API Key: Verify your API key is correct in Searchly → API Settings
- Test Connection: Click "Test Connection" to verify API connectivity
- Sync Content: Make sure content is synced (Searchly → Content Sync)
- Check Error Logs: Look in WordPress debug.log for error messages
No Search Results
- Content Not Synced: Go to Content Sync and click "Sync All Content"
- Posts Excluded: Check if posts are excluded in settings
- Index Empty: Click "Reindex Content" to rebuild index
GPT Correction Not Working
- Check Configuration: Verify GPT is enabled in settings
- API Key: Ensure OpenAI API key is valid (if using own key)
- Credits: Check if you have available credits (if using Searchly GPT)
- Test GPT: Use "Test System GPT" button to verify
Clicks Not Being Recorded
- Check Analytics: Go to Analytics page and verify clicks table exists
- Browser Console: Check for JavaScript errors (F12 → Console)
- Post ID: Verify search results include post IDs
- AJAX Working: Check if AJAX requests are being sent
Error Messages
"API key not configured"
Solution: Go to Searchly → API Settings and enter your API key.
"Site not registered"
Solution: Save your API key again. The site will auto-register.
"Search failed"
Solution: Check API connection, verify content is synced, check error logs.
"Insufficient credits"
Solution: Check your plan and credits in Searchly → API Settings → Your Plan & Usage.
Debug Mode
Enable WordPress debug logging to see detailed error messages:
// Add to wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Then check /wp-content/debug.log for Searchly error messages.
Getting Help
- Documentation: This page contains comprehensive guides
- Support: Contact support at searchly.pro/support
- Account Dashboard: Visit searchly.pro/my-account