Installing Relevanssi and adjusting the settings

Installing Relevanssi is simple.

For free version, install the latest version of the plugin from WordPress.org plugin repository.

For Premium, download the latest version from Relevanssi.com and either upload the zip file using the WordPress plugin installation or unzip it and upload the files with FTP in the /wp-content/plugins/ directory.

After installing, check Settings > Relevanssi to adjust the settings and build the index.

Search widget

Relevanssi doesn’t come with a search widget. You can use the default WordPress search widget or any other method that generates a standards-compliant search form.

Overview

Overview
Overview tab

On the overview tab, you’ll find the API key setting (Premium only). If you’re on a multisite network, the API key field is not here, it is in the Network admin dashboard.

Enter your API key here to enable automatic updates and PDF indexing. API key can be found here on Relevanssi.com – it’s in the sidebar when you’re logged in.

Hide Relevanssi on edit pages (Premium only) hides everything about Relevanssi from post edit pages.

Indexing

Indexing tab
Indexing tab

All options on this tab affect the indexing and won’t have any effect until you build the index. You need to save the options before indexing. Clicking Build the index will wipe the index clean and rebuild the complete index, based on the indexing settings you’ve chosen on this tab. The indexing will run until it’s finished. It can take a while, especially on a large site, but the indexing process will show an estimate of the remaining time. Keep the browser window open as long as it takes to index.

If for some reason the indexing is interrupted, you can click the Index unindexed posts. This will index all the remaining posts (including all post types). This button can be useful if you import posts in a way that doesn’t trigger Relevanssi indexing: just click the button after the import to index all the new posts.

State of the index shows the number of documents (posts, pages), users and taxonomy terms (Premium only) in the index, number of terms (words) in the index and the highest post ID in the index. These are useful for debugging purposes, for example to see if the indexing works.

Post types
Just check the boxes for each post type you wish to include in the index. The “Excluded from search?” column shows whether the post type is marked public or not, but it doesn’t mean you can’t index those post types. It’s just for information.

Taxonomies
Choose which taxonomies are indexed for the posts. If you check a taxonomy here, it means that searching for the taxonomy term name will find all posts that have this taxonomy term attached to them. Again, the “Public?” column is just for your information.

Comments
Choose which comments are indexed. You can choose to include only regular comments or also include pingbacks and trackbacks.

Custom fields
Choose which custom fields are indexed. “All” includes all custom fields assigned to a post, “visible” only those that are shown on the edit page. If a custom field name starts with an underscore (_), it is hidden from the post edit page, and won’t be included if this setting is set to “visible”. Since some themes can add quite a bit of behind-the-scenes data in the custom fields, “visible” is a reasonable setting. You can also choose to index only specific fields you list.

Relevanssi Premium supports ACF repeater fields, using the notation fieldname_%_subfieldname.

Author display names
If this option is enabled, Relevanssi will index author display names. Searching for an author will find all posts written by the author.

Excerpts
If this option is enabled, Relevanssi will index post excerpts.

Expand shortcodes
If this option is checked, Relevanssi will expand all shortcodes in post content before indexing the post. That means the shortcode content will be included in the index. This doesn’t always work as expected. If the shortcode provides dynamic content, Relevanssi will index the post with the content at the moment of indexing, and won’t update the index when the dynamic content changes.

Some plugins don’t enable their shortcodes in the admin side, so Relevanssi can’t expand them. Some plugins, especially those that don’t respect WP programming standards, may break Relevanssi. If indexing doesn’t work, one of the first things to try is to disable this option.

Disable these shortcodes (Premium only)
You can list unwanted shortcodes here: if a shortcode is causing problems in indexing, list it here and it will be disabled when Relevanssi indexes posts.

Index user profiles (Premium only)
If this is checked, Relevanssi will index user profiles. Relevanssi indexes first name, last name, display name and user description. You can also index other data for users, see two options down.

Since WordPress expects the search results to be posts, Relevanssi needs to convert the user profiles to posts. That requires some changes in your search results template. the_permalink() should work in most cases, pointing to the user profiles. See User profile search for more information.

Index subscribers (Premium only)
If checked, Relevanssi will also index subscribers, otherwise only admins, editors, authors and contributors are indexed.

Extra fields (Premium only)
If you want to index other user fields, you can list them here. These field names should correspond to MySQL database columns in the wp_user table or user custom fields.

Index synonyms (Premium only)
Synonyms generally only work in OR searches: the synonyms are used by adding more words to the search query and in OR search that works as expected, widening the search. In AND search, it will restrict the search, so it won’t work. Enabling this option will make Relevanssi index the synonyms as part of the post content, making them compatible with AND searches.

Index taxonomy terms (Premium only)
If you enable this option, you can index taxonomy term pages. If this option is enabled, searching for a taxonomy term name will return the term archive page as a result. By default, Relevanssi only indexes those terms that are attached to posts. With this option enabled, get_permalink() won’t work on search results template. the_permalink() does, but if you don’t want to echo the permalink, you can use relevanssi_get_permalink() instead. See Indexing taxonomy pages.

Taxonomies controls which taxonomies are indexed.

Index for parent (Premium only)
If checked, Relevanssi indexes the PDF content both for the attachment post and the parent post. You can control the attachment post visibility by indexing or not indexing the post type attachment.

Advanced indexing settings

Minimum word length
Enter an integer. Words shorter than this many characters are not indexed. The default value 3 is pretty good for English, for other languages other values may make sense.

Punctuation control
By default Relevanssi removes some punctuation completely and replaces the rest with spaces. These fields give you control over the most common punctuation types: ampersands, hyphens, dashes, apostrophes and quotes. You can define the behaviour for all of these classes. The correct settings depend on what kind of content you want to search, but the default values make sense in most cases.

Thousands separator (Premium only)
This option helps indexing large numbers. Particularly in languages like Finnish where the thousands separator is a space, you can enter space here and have numbers like “1 000 000” indexed correctly as “1000000”. Since Relevanssi replaces periods and commas with spaces, using this option will make sense with those separators as well.

MySQL columns (Premium only)
If you have a plugin that writes the data in a custom column in wp_posts MySQL table, you can add the column name here to have that data indexed.

Internal links (Premium only)
This option sets how Relevanssi handles internal links (links that point to your own site). If you choose “No special processing”, Relevanssi doesn’t care about links and indexes the link anchor (the text of the link) like it is any other text. If you choose “Index internal links for target documents only”, then the link is indexed like the link anchor text were the part of the link target, not the post where the link is.

Attachments (Premium only)

Attachments tab
Attachments tab

Attachment tab handles the PDF content reading. If you have PDF files in your Media Library, Relevanssi can read in the PDF contents so that they are available for indexing.

In order to read the contents of the PDFs, the files are sent over to Relevanssiservices.com, a PDF processing service hosted on a Digital Ocean Droplet in the USA. The service creates a working copy of the files. The copy is removed after the file has been processed, but there are no guarantees that someone with an access to the server couldn’t see the files. Do not read files with confidential information in them. In order to block individual files from reading, use the Relevanssi post controls on attachment edit page to exclude attachment posts from indexing.

Read all unread PDFs reads in all the PDF content in attachments. This does not wipe the index, and will only process those PDFs which haven’t been read yet. If reading the PDF caused an error message before, the PDF will be skipped, unless the error message is a time out, in which case it’s attempted again.

Reset all PDF data from the posts will empty out the PDF information from the posts. It is stored in the attachment metadata: content in _relevanssi_pdf_content and errors in _relevanssi_pdf_error. Clicking this button will wipe these custom fields empty.

Upload PDF files
By default Relevanssi sends a link to the PDF to the reading service, which then downloads the PDF and reads it. However, if your files are behind a firewall, in an intranet or otherwise not accessible from the outside world, this is not going to work. In that case, check this option, and Relevanssi will upload the files directly.

Link to PDFs
If you decide to have attachments in search results (by indexing the attachment post type), by default the links in search results pages will lead to the attachment page. That’s often less than helpful, as it’ll take one more click to reach the actual PDF. Enabling this option will make the search results pages link directly to the PDF file.

Searching

Searching tab
Searching tab

Default operator
OR search will return all posts where at least one of the search terms appears. AND search will only return posts that have all search terms in them. OR search will prefer posts that have all search terms in them, so in most cases it is the better option.

Fallback to OR
If you have chosen AND as the default operator and the search finds no results, Relevanssi will perform an OR search with the same search terms. If you want to disable this, check this option.

Default order
By default Relevanssi orders results by relevance, trying to put the most relevant results first. This makes a lot of sense. Some people prefer other methods. From the settings page, you can choose post date order, most recent posts first. If you want other orderings, you can use the orderby parameter. For multiple levels of ordering, Relevanssi supports array orderby.

Keyword matching
Relevanssi can match whole words or partial words. Matching whole words means only complete words are matched. If you search for “ledge”, you will only find documents that contain the word “ledge”. Partial words also matches parts of words, so searching for “ledge” will also finds documents that contain words “knowledge” and “ledger”.

The search term has to be either in the beginning or the end of the word, so searching for “ion” will find “caution” or “ionized”, but not “cautionary”.

Weights
Here you can adjust weights for different features like post titles, tags, comments, different post types or taxonomies. Some of these adjustments are Premium only. All the weights work the same way: they are multipliers, so 1 keeps the weight neutral compared to everything else, below 1 makes the weight smaller and values over 1 make the particular item weigh heavier in the matching.

If you want to emphasize something, don’t be afraid of using big numbers. If you want to make sure that posts with the search terms in titles come up in the search, slap a weight of 100 or 1000 for the titles. Subtlety is overrated.

Recent posts bonus cutoff (Premium only)
If you’ve added extra weight for recent posts, this option determines which posts are considered recent.

Admin search
If you enable this option, Relevanssi will be enabled for admin searches. Otherwise default WordPress search will be used in all searches in the admin interface. Admin searches may not always work very smoothly. For example page search will not use Relevanssi, because that’s just how WordPress works.

Respect exclude_from_search
If you check this option, custom post types which have exclude_from_search set to true will be excluded from the search. If the option is unchecked, Relevanssi won’t respect that setting and will search anything that is indexed.

Throttle searches
On large sites searches can become heavy to process, particularly when there are common words involved. Relevanssi has to load every post that is found by any search term, and that can require lots of memory. In most cases, the user only cares about the few posts on the first page of search results.

This option will restrict Relevanssi to only first 500 posts per search term. Relevanssi will only take the first 500 posts per search term, so the maximum number of posts Relevanssi will load in memory is 500 times the number of search terms. The 500 posts are chosen with some sense, so it is very likely the best posts are within those 500 posts. This way the search becomes more effective and less memory-intensive. On a small site this option isn’t necessary – if a single search term finds less than 500 posts, the limit of 500 doesn’t make any difference – but on a large site this is very useful option, and I recommend you use this option all the time.

Do note that choosing the probably best posts only works with the relevance ordering. If your order posts by date, it is quite likely the limit will drop out useful posts. If you need to have the limit and you want posts ordered by date, I suggest you set Relevanssi to relevance order, use a limit and then use orderby parameter to sort the results by date.

Category restriction
If you want to restrict search to a particular category, you can do it here.

You can also use the input field ‘cats’ to do this on a search form basis, that’s the more flexible way to handle this. If you use both the input field and this option, the input field will overrun this.

Category exclusion
Here you can permanently exclude categories from search. The ‘cats’ input field also takes negative values for exclusion.

Post exclusion
If you want to permanently exclude posts or pages from search, you can list their numeric IDs here. In Premium, you can also use a checkbox on the edit pages to exclude posts. That is easier to use and works in multisite searches, unlike this option.

Logging

Logging tab
Logging tab

Keep a log of user queries
If you enable logging, then you’ll find the searches logged and presented in Dashboard > User searches. Logs are necessary for the Did you mean function to work in the free version.

Log user IP
Enable this option to log the user IP addresses. Do note that this may be illegal in your jurisdiction, or require GDPR paperwork. The IP addresses are not visible on the User Searches page, but can be found in the wp_relevanssi_log database table.

Exclude users
If you want to disable logging for particular users (like yourself), add a list of comma-separated numeric user IDs or login names here. “admin” is a good start, unless you’ve changed the main user login name.

Hide Relevanssi branding (Premium only)
Useful option if you’ve installed Relevanssi on a client page, this will remove all Relevanssi branding on the user searches screen, so your client won’t be confused.

Trim logs
The log database can get large. It is possible to automatically trim the logs. Enter a number here, and the logs older than that many days will be automatically removed.

Excerpts and highlights

Excerpts & Highlights tab
Excerpts & Highlights tab

Custom search result snippets
To have Relevanssi create custom excerpts highlighting the hits in searches, you need to enable this option. Relevanssi will then replace the post excerpt with something it has created on the fly (so the original post excerpt is overwritten, but only for the particular search, not permanently; also, the original excerpt is available in $post->original_excerpt).

To see the excerpts, make sure your search results template is using the_excerpt(). If your search results template uses the_content() or something else to show the post content, it’s possible you won’t see the Relevanssi excerpts.

Length of the snippet
Choose the length of the excerpt, either in words or in characters. Use words, it’s many times faster than using characters.

Allowable tags in excerpts
List of all HTML tags that should be allowed in the excerpts. List the tags without any whitespace, like this: <p><a><strong>.

Use custom fields for excerpts
If you are searching custom fields, by default Relevanssi doesn’t use the custom field content to build excerpts. If you check this option, Relevanssi will use the custom fields it is indexing as a source material for excerpts.

Highlight type
Here you can choose the method of highlighting used: <mark>, <em> or <strong> tags, text colour, background colour, CSS style or CSS class. CSS style means you later enter CSS stylings, which are used for highlighting (<span style=”your style”>). If you wish to keep styles in separate files, use CSS class (<span class=”your class”>).

Highlight in titles
Titles are not highlighted unless you enable this option. You also need to replace the_title() in the search results template with relevanssi_the_title().

Highlight in documents
If you check this option, the search terms are also highlighted in the posts that are opened from the search results. This requires an extra parameter (highlight) to the links from the search results pages so in order to get these highlights, you need to use relevanssi_get_permalink() or relevanssi_the_permalink() to print out the permalinks on the search results templates.

Highlight from external searches (Premium only)
Highlights search terms from external searches. Currently this feature works with Bing, Ask, Yahoo and AOL searches. Support for other search engines is available on request, but Google is not an option.

Highlight in comments
If you enable this option, Relevanssi highlights query terms in comment text, when you open the post from the search results page.

Highlighting problems with non-ASCII alphabet?
Most people need not uncheck this, but if you’re using for example Cyrillic alphabet and the highlighting doesn’t work properly, unchecking this option will help. By default the highlighting regexp is using word boundary markers, and those do not always work properly with non-ASCII characters.

Breakdown of search hits in excerpts
If this is checked, Relevanssi will add extra information in the end of the search result excerpts.

The breakdown format
If you enabled the breakdown, this option determines what is shown. There are couple of keywords you can use: %body%, %title%, %tags% and %comments% show the number of hits in body, title, tags and comments. %total% shows the number of hits in total. %score% shows the relevancy score of the post. %terms% shows how many hits each search term has. Try and see how each one of these works, %score% and %terms% are the most interesting keywords in most cases.

Synonyms

Synonyms tab
Synonyms tab

Synonyms can be used to make search more powerful. If you have for example lots of abbreviations in your posts, but some posts use the non-abbreviated form, you can make those two synonyms for each other. Searching for one will find the other.

Synonyms are entered as “word=word” pairs. The pairs are one-way, so if you enter “sdj=spiel des jahres”, any searches for “sdj” will be expanded to search for “spiel des jahres” as well, but it doesn’t work the other way around. If you want two ways, enter both.

Synonyms only work with OR search, where it’s possible to expand search by adding more terms to it (because that’s what synonym expansion does). In AND search, adding more words restricts the search further. In order to use synonyms in AND searches, you need to enable the indexing setting to index synonyms (Premium only).

Stopwords

Stopwords tab
Stopwords tab

Stopwords are words that are not indexed. Large part of any text will consist of support words that are pointless for searching. Those meaningless words would still be the biggest part of the index, were they left in.

Relevanssi has stopword lists for English (both US and UK), Portuguese (both Portuguese and Brazilian), Polish, French, Finnish, Spanish and German. The plugin should load in the correct stopword file based on your blog language setting. You can see the list of current stopwords on the settings page. If you want to remove a word, just click on it. You can also add stopwords.

If you add a stopword, it is automatically removed from the index, so you don’t need to reindex to see the effect. If you remove a stopword, it won’t be returned to index without a reindex.

25 most common words in the index
This list shows the 25 most common words in your index. These words often make good stopword material, so if you want to, you can click the icon after the word to make it a stopword.

Import or export options (Premium only)

Import / export tab
Import / export tab

This field contains all the Relevanssi options in serialized text format. You can simply copy them and paste them on another Relevanssi installation to copy the settings. Make sure both installations are running the same version of Relevanssi before you import settings, though.

100 comments Installing Relevanssi and adjusting the settings

    1. Just add it. WP under the theme has search functionality, theme can’t overrule it. Just copy the search form from any WP site – it’s a GET form that has the search terms in an input field ‘s’. Then it’s just a question of setting up a search results template, if the default doesn’t work.

      1. So, with your theme, we just use the default search widget? Or…do we add it somewhere? This could be made more clear in the documentation for us n00b users. You went in depth on everything else – but this.

        1. Yes, just use the default search widget. It is not mentioned, because in most cases, you really have to do nothing – just use the search widget your theme already has, and most themes do have one.

  1. Hi Mikko, I just tried to install the free version but am not seeing any changes in the search widget. I have a premium theme from Solostream (Wp-Mysterious) and also I have checked the “Use Search for Admin” box. What do I need to do to get this to work?

      1. Nope, there is no “query_posts()” in the “search.php” file for the Wp-Mysterious theme. Can you recommend another advanced search plugin that might work? Specifically one that allows users to search within certain categories or for posts that carry certain tags. Or might you be able to tell me what search plugin the website http://www.filmsforaction.org is using? That would be ideal. Thanks!

  2. Hi Mikko, is it possible to add more than 1 synonym to 1 word for example “red=rouge,rot,rod “?

    Thanks,
    Alex

  3. I’ve just installed relevanssi on http://www.mindtheproduct.com and basic search seems to work fine, the relevancy sort is great.

    However I can’t seem to get synonyms to work. I’m trying to get searches for prioritization to show results including prioritisation so entered:

    prioritization=prioritisation
    prioritisation=prioritization

    but searching for prioritization still returns no results. Searching for prioritisation returns about 10 results.

    Any ideas?

    And is there any general library of US/UK spelling synonyms available?

    thanks,

    Martin

  4. I can’t seem to get synonyms to work either. I’ve entered

    obits=obituaries

    But I still get 0 results if I search on “obits,” even though “obituaries” gets pages and pages of results.

    Any thoughts? Am I entering it in the box wrong — do I need quotes or anything? The method I’ve been trying is word pairs, 1 to a line. Should I comma delineate?

    Thanks so much.

  5. Hi Mikko. My client would like the search results to show the relevancy score,YET have the results displayed by DATE. I have selected this option in the settings: Default order for results: POST DATE. But it is still displaying by RELEVANCE. Any thoughts? can you help?

  6. I’m not certain if this is something I could use the synonyms feature for but when I search the word S&P I only get searches for the letter S and the letter P. Is there a way to treat the ampersand as part of the word? There are hundreds of posts with the word S&P in them.

  7. I am trying to exclude some pages with “Exclude these posts/pages from search:”. But it doesn’t work. Pages continue appearing on searches. These pages would be “635, 298, 639, 379, 294, 668, 1782, 147, 2920, 2874”. Some solution?

      1. Versión 3.3.5. I am not sure at all, but I think It’s running via Relevanssi. Our web is tavad.com. Can u check?

          1. And how can I be sure the website is using relevanssi? I have added the code in functions.php and after that, shown results have been different to WP results

          2. What code did you add? Relevanssi shouldn’t require you to add any code, anywhere. Also, do you have working search on your site somewhere? When I try to use the search on your home page, I don’t get any results page at all, I just get the home page.

          3. Ok, now I’m seeing a search results page. Looks like Relevanssi, yes. As for the exclusion not working – I’m not sure. There shouldn’t be any reason for it not to work; I just tested it on my test blog, and the feature works just fine.

  8. Hi Mikko,

    Thank you for creating this great plugin! Your work is benefiting a lot of WordPress users.

    Just a small question…

    I checked the box for highlighting query results in titles, but somehow no difference is shown. My site runs on the Genesis framework with a StudioPress child theme. The URL for you to test is:

    http://hashimnaushahi.com

    I haven’t got any posts of myself on it yet, just some demo posts. So you can try searching for ’email’ or ‘mobile’ to see how the results look like.

    Could you help me out with this?

    Thank you in advance!

    Sincerely,

    Hashim

    1. Hi, highlighting in titles requires changes in templates. Unfortunately, since you use Genesis, you’re pretty much out of luck, unless you’re skilled in Genesis template editing – it’s not an easy thing to do. You’d have to change the_title() functions in the template to relevanssi_the_title() – a very simple thing, but rather complicated with Genesis.

  9. Can I create multiple search boxes with different setting? So on certain pages I want the search bar to be restricted to a set of categories, but for the search bar everywhere else I want it to search site-wide?

        1. No, not in particular, but there’s not much need, either. Just create a search form that has a category parameter (hidden input field named “cat”; for exact parameters see WP_Query documentation in WP Codex), then create another search form with different parameters, and place those as you see fit.

      1. I did, but post excerpts are still indexed and this is a problem for me. Can you think of anything that went wrong?

        Thank you

  10. I’m newbie with installing wordpress script. Is this a way that I can add this pluggin into my menu nav?

    Thanks!

  11. I am having trouble entering stopwords containing apostrophes. When I add “aren’t”, it displays as “aaren\\\’t”. Furthermore, if I click on it to remove, it won’t let me. Showing error msg: “Couldn’t remove term ‘aaren\\\\\\’t’ from stopwords!”

      1. Thanks for the update, Mikko. I am now able to add stopwords like “aren’t” but still can’t remove the old ones, same error. Any suggestions? Perhaps manually remove them from the DB?

  12. Installed relevanssi and can’t get the synonyms to work either. I have the default operator on “OR” so I can’t figure out what I’m doing wrong.

      1. I thought installation and activation meant that Relevanssi would then enhance the existing search capability in WP. Is there something else I need to do to invoke Relevanssi searching?

        1. Generally no, but some themes block Relevanssi from working and need extra work. Checking whether Relevanssi is actually powering the search is one of the basic debugging steps if you have problems with Relevanssi.

          1. That’s the first I ever hear of that theme, so no idea. Try switching to one of the default themes – does the search work then? If it does, then the problem is likely your theme. If it doesn’t, then it’s something else.

      1. No they aren’t posts – I’m new to this – so should I put the spreadsheet in a post somehow and just not show that post?

  13. With relevanssi enabled for admin search, I get no results, when I search my menu to find posts or pages. I need the admin search because I have 10,000 posts and relevanssi helps me get more accurate search results when looking for post name, so it is working great when just looking for posts in the general post section admin search, but when I want to find a post to add to my main menu (under appearance), the search brings back 0 results. Any ideas how to fix this?

      1. Hey! I’m not sure if you fixed this yet. I have the same problem when searching for pages in the actual pages section. Relevanssi turned on for admin simply returns 0 results.

    1. If the Chinese text is in UTF-8, Relevanssi can read it and index it. However, Relevanssi simply does not work with Chinese or Japanese: these languages do not separate words in a way Relevanssi understands. Thus, even if you could index the contents, they wouldn’t make any sense. So unfortunately you have to forget about using Relevanssi with Chinese or Japanese.

  14. Dear Relevannsi Team,

    I am using your plugin and am happy so far. One question that came up is when looking at the search results page. That little “document” icon on the right of the search result, can this be deactivated. The user would arrive at the content page containing the seach term, clicking at the title of the page it was found on in the search results and via clicking this little icon. This are two links to the same and therefore might be a bit misleading. Can I deactivate that icon?

    Thank you for your excellent work and plugin.
    Best regards,
    Max

  15. Two questions.

    1. What is the latest version of PHP you are supporting?
    2. What is the correct format for ignoring shortcodes : basic or with all attributes e.g. [formidable] or [formidable id=”1″]?

    1. Stephen, any PHP 7 versions should be fine. Oldest we support is 5.6.

      Disable shortcodes using just the name of the shortcode, no attributes are necessary. It will disable all occasions, no matter the attributes.

  16. Thank you for the fast reply. I am using the download attachments plugin and for some reason that shortcode is not being ignored. The download attachments plugin has an issue with PHP 7.1+, but I am assuming that should not have an impact on indexing since it should not be rendering it at all. I setup a test site at http://avada.cfuser.com to troubleshoot the issue if you want to see it.

  17. Hi there , I am using Relevanssi on my woocommerce website, I have enabled indexing product tags which it is doing fine the problem is it is reading space as a character like it gives 0 result for handmade but gives result for hand made which is a tag.
    Kindly reply if its a bug or am I missing some thing..

    Kind Regards

    1. Sana, “handmade” and “hand made” are two different things, and Relevanssi can’t tell they’re the same thing. Relevanssi doesn’t understand language. Add a synonym “handmade=hand made” in the Synonym tab.

  18. Hi,
    I’ve added Relevanssi to our e-com site, yet I do not see any products when searched (with exact product tags). The search only shows blog post results. What am I missing? Thanks.

  19. Hi Mikko, thanks for a great plugin! I have a site running on WPEngine and Relevanssi worked fine there since installing it in May. After updating the plugin to the latest version I get 502 bad gateway errors from every search. After disabling Relevanssi the search feature works as expected (but obviously search results are not as good as with Relevanssi enabled). Have you heard others on WPEngine reporting this? Would love to help fix this problem!

    1. Ville, no, this is the first complaint I’ve heard. What kind of settings you have, and how big is your database? 502 usually means the search is too heavy for the server.

      1. Found a possible issue after some debugging.

        The plugin seemed to crash in the Polylang compatibility filters (even though I don’t have Polylang installed). The real issue might still be related to WPEngine but after installing Polylang the search works again!

        I’m happy debug a bit more in order to find out the real issue but at least I can enable the plugin again.

        1. Polylang compatibility filters shouldn’t even load unless Polylang is installed. Does your site return true for function_exists('pll_get_post') when Polylang is not installed? If Polylang compatibility runs when Polylang is not installed, I’m not surprised there’s a crash.

          1. Found the real issue after more digging.

            The site used a theme that had some “helpful” Polylang fallbacks, just in case Polylang *isn’t* installed. Indeed the theme declares pll_get_post and some other Polylang functions if they don’t exist.

            Happy to say that Relevanssi has nothing to do with this, this was a problem with the theme.

  20. Hello, Relevanssi was working fine, but after WPENGINE CDN, stopped working. Is it due to CDN and cache, right now the intended search page doesn’t show when clicked on search

  21. Hi, Mikko

    I was just wondering if it’s possible to make Relevanssi show results only when the beginning of the word matches the search term?

    1. Algirdas, yes:

      add_filter( 'relevanssi_fuzzy_query', 'rlv_only_beginning' );
      function rlv_only_beginning( $query ) {
          return "(relevanssi.term LIKE '#term#%')";
      }

      Add this to your theme functions.php.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.