XF 2.1.0 Search Term Matching inconsistency ?


Well-known member
I have an XF 2.1.0 test install with Enhanced search 2.1.0 addon installed and tried the following search terms - 7.2.14, 7.2 and 7.2* with and without @Xon search improvements addon enabled and seem to get inconsistent matches with word stemming enabled ?

The search term = 7.2 only matches some posts with 7.2.14 text and not other posts with 7.2.14 text it in ??
  • Centmin Mod Nginx 1.15.8
  • PHP-FPM 7.3.2
  • MariaDB 10.3.12
  • CentOS 7.6 64bit
  • Elasticsearch 6.6.0
searching 7.2.14


searching 7.2 see it matches one posts 7.2.14 but not the older one in Custom bbcodes titled thread for post containing 7.2.14 term above ?


Custom bbcodes post has the following and doesn't get returned when searching = 7.2 but does get returned when searching = 7.2.14 or 7.2*


searching 7.2* matches them all like 7.2.14


Enhanced search settings



XenForo developer
Staff member
Note that the highlighting within results is an internal system -- it doesn't directly relate to the underlying match process. I suspect that there is some specific "7.2" text in there that's matching.

We use Elasticsearch's standard tokenizer, so if you have "a.b" or "a.b.c", these will be single tokens within Elasticsearch. Therefore, 7.2* would be needed to match something like 7.2.14. Changing this would require using some custom tokenizer filters -- this isn't something we expose in the XFES UI though so it'd require custom Elasticsearch index calls. As an example, I think that adding this one might do what you want:



Well-known member
Thanks @Mike for the explanation. Not sure I would know how to implement such myself. Maybe something for @Xon's search improvements addon ? :)

For now I'll just edit template so that search forms highlight that wildcard and other search operators are supported with Xon's search improvements addon installed :D

  • Like
Reactions: Xon