Skip to main content

WordPress Connector

The WordPress Connector is a PHP plugin installed directly inside WordPress, not a Java connector plugin. It hooks into WordPress publish, update, and delete events to keep the search index synchronized with your content in real time.

This is a WordPress plugin, not a Java plugin

Unlike the AEM and Web Crawler connectors (which are Java JARs loaded via -Dloader.path), the WordPress Connector is a PHP plugin that you install in your WordPress wp-content/plugins/ directory. It communicates directly with Viglet Turing via HTTP, no dumont-connector.jar needed.


Unlike the AEM and Web Crawler connectors, the WordPress plugin is not part of the Dumont connector application: it runs entirely inside WordPress and sends content directly to Turing via HTTP. No dumont-connector.jar is needed.


How It Works​

The plugin integrates with WordPress hooks to automatically push content to the search index:

  1. On publish: When a post or page is published, the plugin extracts its content and sends it to Turing
  2. On update: When published content is modified, the index is updated automatically
  3. On delete: When content is trashed or deleted, it is removed from the index
  4. On status change: When a published post is changed to draft or private, it is removed from the index
  5. Manual bulk indexing: The admin panel provides buttons to index all posts or all pages in batches of 250

There is no scheduled or cron-based indexing, everything is event-driven or manually triggered.


Installation​

  1. Copy the viglet-turing-for-wordpress plugin folder to your WordPress installation:
wp-content/plugins/viglet-turing-for-wordpress/
  1. Activate the plugin in WordPress Admin → Plugins

  2. Configure the connection in Settings → Viglet Dumont


Configuration​

Server Settings​

FieldDefaultDescription
HostlocalhostTuring server hostname
Port2700Turing server port
Path/dumontBase path for the indexing endpoint
Site Name(required)Semantic Navigation Site name in Turing

Indexing Options​

FieldDescription
Post typesWhich content types to index (posts, pages, custom post types)
Remove on deleteAutomatically remove from index when content is deleted
Remove on status changeRemove from index when status changes from published to draft/private
Index commentsInclude post comments in the indexed content
Custom fieldsAdditional WordPress custom fields to include in the index
Excluded IDsPost IDs to exclude from indexing

Search Display Options​

FieldDescription
Results per pageNumber of search results to display
Show facetsEnable faceted navigation on the search results page
Facet fieldsWhich fields to show as facets (categories, tags, author, type)
SpellcheckEnable spelling suggestions for search queries
Max tagsMaximum number of tags to display in facets

Indexed Fields​

The plugin extracts and sends these fields to Turing:

FieldSource
idWordPress post ID
titlePost/page title
contentFull post content
contentnoshortcodesContent with WordPress shortcodes removed
permalinkCanonical URL
authorAuthor display name
typeContent type (post, page, custom)
datePublication date
modifiedLast modification date
categoriesCategory names (multi-valued)
tagsTag names (multi-valued)
numcommentsComment count
commentsComment text (if comment indexing is enabled)
Custom fieldsAny configured custom fields

Multisite Support​

The plugin supports WordPress multisite installations. When activated network-wide, it can index content from all blogs in the network, including blogid, blogdomain, and blogpath fields for each document.


Admin Panel Actions​

The plugin adds action buttons to the WordPress admin settings page:

ActionDescription
PingTests the connection to Turing
Index all PostsBulk indexes all published posts (batches of 250)
Index all PagesBulk indexes all published pages (batches of 250)
Delete allRemoves all WordPress content from the Turing index
OptimizeTriggers index optimization on the search engine

Architecture​

The plugin includes its own PHP HTTP client library (DumontPhpClient) for communicating with Turing:

viglet-turing-for-wordpress/
├── viglet-turing-for-wordpress.php # Main plugin (hooks, indexing, search)
├── viglet-turing-options-page.php # Admin settings page
├── DumontPhpClient/
│ └── Viglet/Dumont/
│ ├── Service.php # HTTP client for Turing
│ ├── Document.php # Document model
│ ├── Response.php # Response parser
│ └── HttpTransport/
│ ├── Curl.php # cURL transport
│ ├── CurlNoReuse.php # cURL without connection reuse
│ └── FileGetContents.php # file_get_contents fallback
└── template/
├── turing4wp_search.php # Search results template
├── search.css # Search results styling
└── autocomplete.css # Autocomplete styling