Solved

how can i disable the stopword in mysql php

Posted on 2008-11-03
3
507 Views
Last Modified: 2012-05-05
how can i disable the stopword in mysql
i am using the select match command using php and i want mysql to index all the word includeing the common words like old,new,and,or......
so how can i do this thanks
0
Comment
Question by:mgtm3
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Expert Comment

by:Valleriani
ID: 22866702
You need access to MySQL files.

I believe in my.cnf (mysqls config file) there is a variable called ft_stopword_file.

You can disable stopwords by setting the variable ft_stopword_file to an empty string and restarting.
0
 
LVL 7

Expert Comment

by:Valleriani
ID: 22866810
P.s.

if it is not there, you can login and check in mysql command based promt. Basicly get into a mysql prompt:

mysql -uroot -pPasshere

After you are logged in to mysql, you can type:

SET Global ft_stopword_file=
\g


\g is for GO, basicly. If it finds it, it should null it. Hopefully that will work if the first step doesnt
0
 
LVL 26

Accepted Solution

by:
Umesh earned 500 total points
ID: 22867050

This variable cannot be set dynamically.. i.e using SET GLOBAL ft_stopword_file =<somevalue>
=====================================================================
Name                  Cmd-Line       Option file       System Var       Var Scope       Dynamic
=====================================================================
ft_stopword_file       Yes          Yes                Yes                 Global                No
=====================================================================

This can be set thru commandline(while starting mysqld), thru optional file(my.cnf/my.ini)


The file from which to read the list of stopwords for full-text searches. All the words from the file are used; comments are not honored. By default, a built-in list of stopwords is used (as defined in the myisam/ft_static.c file). Setting this variable to the empty string ('') disables stopword filtering.

As given in above comment...pls place this in my.cnf/my.ini(if windows)

ft_stopword_file=''


Also, do remember

Note

FULLTEXT indexes must be rebuilt after changing this variable or the contents of the stopword file. Use REPAIR TABLE tbl_name QUICK.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
This article discusses how to implement server side field validation and display customized error messages to the client.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question