Solved

how can i disable the stopword in mysql php

Posted on 2008-11-03
3
494 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
  • 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:
ushastry 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Passing variables to stored procedure 3 35
join tables 4 50
configure dependency in POM for new database 3 15
array_values - reorder after unset? 5 11
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo‚Ķ
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

911 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now