Solved XenForo: allow seeking three-character strings

A question for the XenForo service administrators here.

Please, can you enable support for three-character strings? I'm on my knees. Begging.

Thanks (… and NB, for all readers, the question here is XenForo feature-specific, so Google is not an answer; neither is DuckDuckGo … and so on).

Apparently searching for anything under four characters doesn't work. …

Maybe I'm missing something, but a text search on the database field(s) should be enough sophistication to do the job. I suspect the problem is that's it's expensive to do that, so certain searches, like searches for short, common words are turned off. …



Phrases such as these:
  1. 101
  2. 780
  3. AMD
  4. ARC
  5. ARM
  6. ATA
  7. BSD
  8. cas
  9. CPU
  10. GPL
  11. GPU
  12. HCL
  13. HDD
  14. HFS
  15. GCC
  16. KDE
  17. kf5
  18. KVM
  19. LKL
  20. pkg
  21. qt5
  22. qt6
  23. re0
  24. SSD
  25. Sun
  26. ue0
  27. UFS
  28. USB
  29. XFS
  30. ZFS

… searching HFS, …

… search for KVM …

… look for "ue0", …

… (cas latency) …

A quick search of "JWM" …

I'm trying to search for "Dell 780" …

XenForo (here) can't seek phrases such as ZFS, and Google doesn't find what's required.
 
 
… isn't going to work in any sane system …

It does appear to work in at least one sane system, however (maintaining focus on the subject line) I'll not discuss it here. Thanks.
 
Last edited:
1638217834982.png


I'm uncomfortable with changing this in MySQL (based on several conflicting pieces of advice and unknown performance penalties).
 
Could it be that there might be something like a DB index rebuild necessary?

Just tried searching (Search titles only) for "ZFS", "UFS": no results.
Search titles only with "UFS2": 2 web pages of search results.
 
Bingo: re-searching on everything with "UFS" or "ZFS" gives ONE ☝️ result:
 
[...] I'm uncomfortable with changing this in MySQL (based on several conflicting pieces of advice and unknown performance penalties).

Just saw your added remark. Does this mean that the high level change in search length is "from now on", i.e. only for everything newly added to the forum? Or, will this change trigger a DB index rebuild at some point in time?
 
The added remark meant that it would not be done at all.

However, after running a couple of simulations on a copied database off-site, I think the three-char limit is not too intrusive.

The search index has been nuked and rebuilt (so it includes past, present, and future).

Any suggestions to implement a two-char search limit will be met with a ban (which is now a searchable word).
 
I'm uncomfortable with changing this in MySQL (based on several conflicting pieces of advice and unknown performance penalties).
I run most of MySQL (5.7) setups with:

Code:
ft-min-word-len=3

and I've not noticed any downsides. But obviously depends on the software, server load, etc.

Thank you for trying the change - it's been a stumbling block a few times when I've been searching the forums so hopefully it doesn't cause any issues.
 
I honestly didn't notice MySQL implemented FTS indexing outside of MyISAM tables until this thread. It's not something widely used (vs Lucene or Sphinx).
They didn't arrive for InnoDB until MySQL 5.6 so I kept any tables needing them on MyISAM, rather than going to another solution like Sphinx.

FTS on MySQL works well for the projects I've worked on, but obviously YMMV and all that - we are spoilt for choice!
 
Back
Top