Skip to content

[00] Subset Search, User guide

Import from Relevanssi

Bring Relevanssi's settings, synonyms, stopwords and recent search log across to Subset Search, with a preview before anything changes.

Subset Search imports Relevanssi’s settings, synonyms, stopwords and, if you choose, the last 30 days of its search log. It reads them straight from the database, so Relevanssi doesn’t need to be active, and it never changes or deletes Relevanssi’s data. You can import again or switch back at any time.

Run the import

  1. Open Subset → Search → Index. The Import section at the bottom appears when Relevanssi’s settings or log are in your database.
  2. Under From Relevanssi, tick Also import the last 30 days of its search log if you want it.
  3. Click Preview. It lists the settings that would change and what can’t be brought across, and writes nothing.
  4. Click Import under the preview.
  5. If the import changed what’s indexed, the Index tab says This needs a reindex. Click Start reindex.
  6. Deactivate Relevanssi.

While Relevanssi is active, Subset Search answers no searches, so the two never search the same query. Site Health says so until you deactivate it. After the import, the Index tab shows what it did under Last import, from Relevanssi.

From the command line:

wp subset search import relevanssi --dry-run
wp subset search import relevanssi --log
wp subset search index --all

What wins

  • A setting you’ve already changed in Subset Search is kept, unless you tick Replace settings already changed here or pass --overwrite. The report lists the settings kept.
  • Weights are compared one at a time, so importing Relevanssi’s title weight doesn’t replace a content weight you set.
  • Synonyms are added to the ones you have. Nothing you added is removed.
  • Running the same import twice changes nothing the second time, the search log included.
  • Every value goes through the same checks as the settings screen. A post type or taxonomy that no longer exists on your site is left out.
  • A setting pinned in wp-config.php is kept, and the report says so.

What’s brought across

RelevanssiSubset Search
Post types to indexPost types. Attachments turn on Media.
Taxonomies to indexTaxonomies
Custom fieldsCustom fields. “Visible” becomes %, every field that doesn’t start with _. “All” becomes % and _%, which indexes everything plugins keep in post meta, so the report suggests listing the fields you want instead.
Comments, author, shortcode expansionComments, Author and Shortcodes
Minimum word lengthShortest word
Title and comment weightsWeights, scaled from Relevanssi’s defaults to Subset Search’s, so a weight you never changed lands on the default
Post type weightsPost type weights
Taxonomy weightsThe Categories, tags and terms weight. Subset Search has one taxonomy weight, so different ones become the highest.
Excerpts not indexedAn excerpt weight of 0
Default operator (AND or OR)Match
Disable OR fallbackFallback
Fuzzy matching: always, sometimes, neverPartial words: always, when nothing matches, never
SynonymsSynonyms, one-way as Relevanssi’s are
StopwordsStopwords
Custom excerpts, excerpt lengthExcerpts and Excerpt length. A length in characters becomes words at about six characters a word.
Highlight in titlesTitles
Keep a log of user queriesSearch log
The search log, with the log optionThe last 30 days: each search’s query, result count and time. IP addresses, user IDs and session IDs stay behind, and a search that looks like an email address or a card number is stored as a hash.

What isn’t brought across

The report lists each of these when your Relevanssi settings use it:

  • Highlight colours and styles. Subset Search wraps matched words in <mark class="subset-search-hit">, which your theme can style.
  • Indexing extra posts table columns. Add that text with the subset_search_document filter, described in the developer reference.
  • The throttle. Subset Search scores at most 1,000 results per search instead.
  • PDF text read by Relevanssi’s hosted service, posts pinned to or hidden from results, and search redirects.
  • An empty taxonomy list. Relevanssi indexed no taxonomies, while Subset Search indexes the public ones unless you list some. Set the Categories, tags and terms weight to 0 to ignore them.
  • Shortcode expansion for every shortcode. Subset Search expands only the shortcodes you list on the Index tab.

Relevanssi’s own data

The import leaves Relevanssi’s tables and settings where they are. Once you’re happy with Subset Search, delete Relevanssi from the Plugins screen to remove them: its own uninstall routine deletes its index and settings.