Results 1 to 4 of 4
  1. #1
    Junior Member psref's Avatar
    Joined
    Dec 2007
    Posts
    5

    Search on 2-char Tags

    When a user does a search for something that is less than 3 characters, Pligg says "no results found." I'm guessing there's logic in there to enforce a minimum of 3 chars. Unfortunately, I have tags for states like "nh" and when a user clicks on those tags, they get "no results". Does anyone know where this setting is?

    Thanks!

  2. #2
    Moderator UnderDogg's Avatar
    Joined
    Mar 2012
    Posts
    42
    There's most likely not a setting for this, but you need to adjust the sourcecode if you want to allow short tags like that.

  3. #3
    Senior Member cmstheme's Avatar
    Joined
    Jan 2007
    Location
    Philippines
    Posts
    592
    I'm not sure but I think it's a limitation/restriction in MySQL, see Change the full text index minimum word length with MySQL and Fine-Tuning MySQL Full-Text Search -default minimum value is four characters.

    Also, you can go to Admin > Configure > Misc > Search Method and you can choose what method you want to use. Maybe altering the search method will give you a result for two chars.

  4. #4
    Junior Member psref's Avatar
    Joined
    Dec 2007
    Posts
    5
    Thanks for the response. I was looking through the source code. I'm not looking for MySQL to do a fulltext search on 2-char, but I'd like to still match the tags for 2-char tags. I found where the setting is.

    In search.php, line 101

    if(strlen($search->searchTerm) < 3 && strlen($search->url) < 3 && !$search->s_date)

    Change the first 3 to a 2

    if(strlen($search->searchTerm) < 2 && strlen($search->url) < 3 && !$search->s_date)

    Uploaded this change, and now search works for matching 2-char tags.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Donate to Pligg CMS Dreamhost Web Hosting Host Gator Web Hosting