vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Search for 3 characters (https://vborg.vbsupport.ru/showthread.php?t=324522)

paradoxG(r)eek 02-24-2017 02:53 PM

Search for 3 characters
 
Hello,

I know that MySQL has a 4 characters limitation for minimum string lenght (ft_min_word_len) and if I want to change it to 3 characters, I must edit my.cnf file and set:
Code:

[mysqld]
ft_min_word_len=3

and then rebuild FULLTEXT indexes.

My question is if vBulletin has somewhere a function to check the words lenght before perform the query, which returns the error message:
Quote:

The following words are either very common, too long, or too short and were not included in your search:
I'm also wondering why this limitation exists for normal (VARCHAR) fields like Title and Username. I believe that these fields are having normal and not FULLTEXT indexes.

Any help will be appreciated. Actually what I want is which vB file to edit to change this text limitation from 4 to 3 characters.

Thank you
Christos

Lynne 02-24-2017 03:39 PM

Yes, vbulletin has a list of words that it considers common. It is in /includes/searchwords.php

paradoxG(r)eek 02-24-2017 04:35 PM

Quote:

Originally Posted by Lynne (Post 2582833)
Yes, vbulletin has a list of words that it considers common. It is in /includes/searchwords.php

Thank you for your prompt attention Lynne. Really appreciated. The most important for me is to find (if exists) where is locating the strlen restriction to change it from 4 to 3.

Seven Skins 02-25-2017 11:54 AM

AdminCP > Message Searching Options > Search Index Minimum Word Length = set it to 3

Lynne 02-25-2017 03:47 PM

Quote:

Originally Posted by paradoxG(r)eek (Post 2582836)
Thank you for your prompt attention Lynne. Really appreciated. The most important for me is to find (if exists) where is locating the strlen restriction to change it from 4 to 3.

Do you mean you don't know where the my.cnf file is? If so, you would need to ask your host where it is because it is in different places on different servers.

paradoxG(r)eek 02-25-2017 04:24 PM

Quote:

Originally Posted by Lynne (Post 2582883)
Do you mean you don't know where the my.cnf file is? If so, you would need to ask your host where it is because it is in different places on different servers.

No, maybe I was not clear. Sorry for my English. I want to know where vBulletin has the "less than 4 characters" validation (if it has such validation).

The error message appears to be from a vB validation before sending the query to mysql. Maybe I'm wrong but this is what I understood.

Edited: Ok, as Seven Skins wrote, I found it but, as I seen, it works only for full words and not for using wildcards to find the letters inside the word.


All times are GMT. The time now is 07:04 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01069 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete