1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Better Search funcionality for selected short words (<4 letters) independent from ft_min_word_len

Discussion in 'XenForo Suggestions' started by Cibox, Nov 25, 2013.

  1. Cibox

    Cibox Member

    In almost all specialised Boards users tend to use abbreviations for the most common words.
    Therefor it would be great to have a "positive list" to index words shorter than the ft_min_word_len of MySQL for the search functionality.

    My suggestion is to give an admin the possibility to fill a positive list with some short words like "LED" or "xF".
    The Xenforo backend than puts some uncommon chars like "_%_" after the short word in the backend, so that MySQL can index this word.
    If a user enters LED in the search mask or the Text with the word LED will be displayed somewhere the Xenforo backend automatically removes or adds the "_%_" after the short word, but only if the word is part of the configured positive list (to prevent indexing of often used and never searched words like "of", "by", "is", "to",...).


    tl;dr; :
    • Positive list for short words in admin area
    • User writes text with word from positive list into his text
    • Word will be extended by Xenforo backend with unusal special chars to match ft_min_word_len in MySQL to get indexed and then saved in database table
    • If text will get displayed the special chars for extending the word length will be automatically removed by Xenforo backend
    • If word will be put into the search box, Xenforo backend hiddenly extends word with special chars and it can be found in the database.
    • Win! :)
     
    Last edited: Nov 25, 2013
    Mark3121, vfustar, FabioCesar and 2 others like this.
  2. W1zzard

    W1zzard Well-Known Member

    Nice idea and good suggestion how to implement.
     
  3. Jeremy

    Jeremy XenForo Moderator Staff Member

    @W1zzard, to show support for a suggestion, please like the first post. This is how Kier and Mike gauge support.
     
    vfustar and Amaury like this.
  4. W1zzard

    W1zzard Well-Known Member

    thanks :)
     

Share This Page