[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
- Open Subset → Search → Index. The Import section at the bottom appears when Relevanssi’s settings or log are in your database.
- Under From Relevanssi, tick Also import the last 30 days of its search log if you want it.
- Click Preview. It lists the settings that would change and what can’t be brought across, and writes nothing.
- Click Import under the preview.
- If the import changed what’s indexed, the Index tab says This needs a reindex. Click Start reindex.
- 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.phpis kept, and the report says so.
What’s brought across
| Relevanssi | Subset Search |
|---|---|
| Post types to index | Post types. Attachments turn on Media. |
| Taxonomies to index | Taxonomies |
| Custom fields | Custom 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 expansion | Comments, Author and Shortcodes |
| Minimum word length | Shortest word |
| Title and comment weights | Weights, scaled from Relevanssi’s defaults to Subset Search’s, so a weight you never changed lands on the default |
| Post type weights | Post type weights |
| Taxonomy weights | The Categories, tags and terms weight. Subset Search has one taxonomy weight, so different ones become the highest. |
| Excerpts not indexed | An excerpt weight of 0 |
| Default operator (AND or OR) | Match |
| Disable OR fallback | Fallback |
| Fuzzy matching: always, sometimes, never | Partial words: always, when nothing matches, never |
| Synonyms | Synonyms, one-way as Relevanssi’s are |
| Stopwords | Stopwords |
| Custom excerpts, excerpt length | Excerpts and Excerpt length. A length in characters becomes words at about six characters a word. |
| Highlight in titles | Titles |
| Keep a log of user queries | Search log |
| The search log, with the log option | The 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_documentfilter, 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.