How to get MySQL Stopwords with SQL
I know that the stopword file could be changed with the help of the ft_stopword_file variable in MySQL. But I need read these stopwords 开发者_如何学Gointo an array in PHP. So my questions is,
Is there a way to get the Stop Words resultset by querying a database with an SQL Query ?
The list of stop-words
is specified in this file storage/myisam/ft_static.c
. So if you want them in a array in PHP, just read the file and convert the contents into the format you need. Apart from this, I dont think there is any other way to query the list from MySQL. Also, please see the stop-words manual
No, but if you've set the path to the stopword file by setting the ft_stopword_file variable, then you know where that file is and can read it in your PHP script directly.
精彩评论