Mori AI Search

Description

WordPress search is literal. Mori is semantic. When someone searches “pricing” or “services,” they get the pages that actually answer those needs, not just posts that happen to repeat the keyword. Mori blends embeddings (vector representations of meaning) with practical controls like post type weighting and tag filtering.

Mori AI Search upgrades your site’s search from basic keyword matching to smart, context-aware results. It builds a structured index of your content using AI, so visitors can find the right page, file, or answer faster. You control what gets indexed, how results are ranked, and which post types matter most. Power users get a clean REST API for custom front ends and integrations.

What it does

  • Creates a rich index of posts, pages, custom post types, and attachments
  • Generates AI-assisted metadata during indexing: keywords, auto-tags, and summaries you can refine with manual tags
  • Ranks results by semantic similarity, then applies weights by post type to surface what matters first
  • Exposes a simple REST API for search, prompts, and admin actions so you can build your own UI or integrate with other tools
  • Lets you exclude items from the index and override tags for precise control
  • Supports PDFs uploaded via the settings screen. Text is extracted and indexed alongside your content

Key features

Structured index

  • Pages, posts, custom post types, and attachments
  • AI-generated keywords and auto-tags, plus manual tags you define
  • Priority flags and per-post type weights for ranking control

Admin controls

  • Single settings screen for API key, prompts, extra context, and PDF uploads
  • One-click reindex that runs in batches via WP-Cron to avoid timeouts
  • Exclusion and tagging interface with incremental loading for large sites

Search API

  • /ai-search/v1/search with support for query, context, tag, and post_type filters
  • Returns normalized data with merged tags, keywords, and scoring details
  • Built-in heuristics to recognize “main pages” or “site map” queries and return primary navigation
  • Optional debug mode that includes similarity scores and SQL filters in the response

Performance-minded

  • Embedding inputs are trimmed to roughly 8k tokens (about 32k characters) per item
  • Batched reindexing with a default of 20 items per run, adjustable via constant
  • Data stored in a dedicated MySQL table for fast lookups

How it works

  1. Add your OpenAI API key on the Mori settings page.
  2. Start a reindex. Mori queues all eligible content and processes it in batches via WP-Cron.
  3. For each item, Mori generates an embedding, proposes tags, extracts 3–5 keywords, and saves everything to the index table.
  4. When a visitor searches, Mori computes similarity between the query and the stored embeddings, applies your weights, filters by tag or post type if requested, and returns the top results.

Data and privacy

  • Nothing is sent to OpenAI until you add an API key.
  • During indexing, only the content needed to build embeddings and metadata is transmitted. That typically includes title, excerpt, main content, and for attachments the extracted text of PDFs you choose to upload through Mori.
  • During a search, the query and optional context are sent to calculate similarity or generate an answer when your configuration calls for it.
  • Review your own privacy policy to disclose how search data is handled on your site. See OpenAI’s Terms of Use and Privacy Policy for provider details.

Typical use cases

  • Marketing sites that need “what is pricing” and “services” to land on the right pages
  • Documentation portals that benefit from keywords and tag filters
  • Media libraries where PDFs and attachments must be discoverable
  • Headless or decoupled setups that want a clean REST search layer

Roadmap

  • Custom theming
  • Optional voice search and chat
  • WooCommerce filters and merchandising signals

Installation

  1. Upload the plugin files to /wp-content/plugins/mori-ai-search or install directly from the WordPress plugins screen.
  2. Activate the plugin.
  3. Go to Settings Mori AI Search and enter your OpenAI API key.
  4. Optionally add a system prompt and additional context to guide metadata generation and answers.
  5. Start a full reindex. Large sites will process in background batches.
  6. Use the REST API in your front end or connect your theme’s search UI.

FAQ

Does Mori replace the front-end search UI?

No. Mori provides the engine and the API. You can wire it into your current search template or build a custom experience.

Can I control what is indexed?

Yes. You can exclude specific posts or pages, control post type weights, and add manual tags.

Will it index PDFs?

Yes, PDFs uploaded through the Mori settings screen are sent for text extraction and indexed as attachments.

How many results are returned?

The API fetches up to 20 candidates, ranks them, and returns the top 5 by default. You can adjust this in your integration.

What happens if I remove the API key?

Indexing and AI features stop. Your existing index table remains until you clear it.

Is this GDPR compliant?

Compliance depends on your configuration and disclosures. Mori only sends data after you provide a key. You remain the controller of your site’s data. Review OpenAI’s policies and update your privacy policy accordingly.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Mori AI Search” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Mori AI Search” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.0.0

  • Initial release: AI-powered indexing, tagging, keyword extraction, PDF support, and REST API.