WordPress Elasticsearch Cloud Plugin with Semantic Search
The Challenge
A network of WordPress publishing sites with 50,000+ articles across multiple properties struggled with:
- WordPress default search returning irrelevant results
- Readers abandoning the site after failed searches (high bounce rate on search pages)
- No ability to search by meaning - only exact keyword matching
- Existing Elasticsearch plugins were outdated, complex, or didn't support Elasticsearch Cloud
- Editorial teams couldn't find their own content for internal linking and research
- Search analytics were non-existent - no insight into what readers were looking for
They needed a modern search solution that understood context and meaning, not just keywords.
The Solution
We developed a custom WordPress plugin that connects to Elasticsearch Cloud with both traditional and semantic/vector search capabilities:
Core Features
1. Elasticsearch Cloud Integration
- Direct connection to Elastic Cloud (no self-hosted infrastructure needed)
- Automatic index management and mapping optimization
- Bulk indexing for existing content with progress tracking
- Real-time sync - new posts are indexed on publish
2. Semantic / Vector Search
- Converts search queries into vector embeddings for meaning-based matching
- Hybrid search combining keyword relevance with semantic similarity
- Understands synonyms, related concepts, and natural language queries
- "More like this" functionality for content recommendations
3. WordPress Admin Integration
- Settings page for connection configuration and index management
- Search analytics dashboard showing popular queries, zero-result searches, and click-through rates
- Customizable search results template with highlighted matches
- WP-CLI commands for bulk operations
4. Performance & Reliability
- Search results in under 200ms for 50,000+ document indices
- Graceful fallback to WordPress default search if Elasticsearch is unavailable
- Query caching for popular searches
- Compatible with WordPress multisite
Development Process
- Weeks 1-2: Plugin architecture, Elasticsearch Cloud connection, basic indexing
- Weeks 3-4: Search UI, admin settings, real-time sync
- Weeks 5-6: Vector search implementation, hybrid scoring
- Week 7: Analytics dashboard, WP-CLI commands
- Week 8: Testing across 5 sites, performance optimization
Technologies & Tools
The Results
Reduction in search bounce rate
More relevant search results vs WordPress default
Average search response time across 50K+ articles
Increase in pages per session from search visitors
Technical Deep Dive
Hybrid Search Architecture
The plugin implements a hybrid search approach that combines two scoring methods:
- BM25 (Traditional): Standard keyword relevance scoring for exact matches
- kNN Vector Search: Semantic similarity using dense vector embeddings
Results are combined using Elasticsearch's built-in reciprocal rank fusion, giving weight to both exact matches and conceptual relevance. This means a search for "how to grow tomatoes" also returns articles about "vegetable gardening tips" and "backyard produce cultivation."
Vector Embedding Pipeline
Content is converted to vector embeddings during indexing:
- Article title, excerpt, and body are concatenated into a search document
- The document is chunked for embedding generation
- Vectors are stored alongside traditional indexed fields
- Query-time embeddings are generated and cached for repeat searches
WordPress Integration
The plugin hooks into WordPress at multiple levels:
save_post/delete_posthooks for real-time sync- Custom search template override (filterable for theme developers)
- REST API endpoints for headless/decoupled WordPress setups
- Admin bar quick-search for editorial use
"Our readers can finally find what they are looking for. The semantic search understands what people mean, not just what they type. Search went from our weakest feature to one of our strongest."
Want Similar Results for Your Business?
We specialize in delivering measurable improvements through custom development and AI integration. Let's discuss how we can help you achieve your goals.
More Case Studies
Explore other success stories