mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge work:/home/bk/mysql-4.0 into hundin.mysql.fi:/my/bk/mysql-4.0
This commit is contained in:
@ -61,7 +61,7 @@ EOF
|
|||||||
# docs-commit@ mail
|
# docs-commit@ mail
|
||||||
#--
|
#--
|
||||||
bk changes -v -r+ | grep -q Docs/manual.texi
|
bk changes -v -r+ | grep -q Docs/manual.texi
|
||||||
if [ $? == 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "Notifying docs list at $DOCS"
|
echo "Notifying docs list at $DOCS"
|
||||||
(
|
(
|
||||||
|
@ -252,7 +252,7 @@ void _ftb_climb_the_tree(FTB_WORD *ftbw, my_off_t curdoc)
|
|||||||
{
|
{
|
||||||
/* NOTE: special sort function of queue assures that all yn<0
|
/* NOTE: special sort function of queue assures that all yn<0
|
||||||
* events for every particular subexpression will
|
* events for every particular subexpression will
|
||||||
* "auto-magically" happen BEFORE all yn>=0 events. So no
|
* "auto-magically" happen BEFORE all the yn>=0 events. So no
|
||||||
* already matched expression can become not-matched again.
|
* already matched expression can become not-matched again.
|
||||||
*/
|
*/
|
||||||
++ftbe->nos;
|
++ftbe->nos;
|
||||||
@ -261,15 +261,14 @@ void _ftb_climb_the_tree(FTB_WORD *ftbw, my_off_t curdoc)
|
|||||||
else
|
else
|
||||||
/* if (yn==0) */
|
/* if (yn==0) */
|
||||||
{
|
{
|
||||||
|
ftbe->cur_weight+=weight;
|
||||||
if (ftbe->yesses >= ftbe->ythresh && !ftbe->nos)
|
if (ftbe->yesses >= ftbe->ythresh && !ftbe->nos)
|
||||||
{
|
{
|
||||||
yn=ftbe->yesno;
|
yn=ftbe->yesno;
|
||||||
ftbe->cur_weight=weight;
|
|
||||||
weight*=ftbe->weight;
|
weight*=ftbe->weight;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ftbe->cur_weight+=weight;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,13 @@ Full-text search in MySQL implements vector space model
|
|||||||
select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE);
|
select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE);
|
||||||
a b
|
a b
|
||||||
Function MATCH ... AGAINST() is used to do a search
|
Function MATCH ... AGAINST() is used to do a search
|
||||||
|
select *, MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE) as x from t1;
|
||||||
|
a b x
|
||||||
|
MySQL has now support for full-text search 1
|
||||||
|
Full-text indexes are called collections 1
|
||||||
|
Only MyISAM tables support collections 2
|
||||||
|
Function MATCH ... AGAINST() is used to do a search 0
|
||||||
|
Full-text search in MySQL implements vector space model 0
|
||||||
delete from t1 where a like "MySQL%";
|
delete from t1 where a like "MySQL%";
|
||||||
drop table t1;
|
drop table t1;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
|
@ -21,6 +21,7 @@ select * from t1 where MATCH(a,b) AGAINST("+support +collections" IN BOOLEAN MOD
|
|||||||
select * from t1 where MATCH(a,b) AGAINST("+search" IN BOOLEAN MODE);
|
select * from t1 where MATCH(a,b) AGAINST("+search" IN BOOLEAN MODE);
|
||||||
select * from t1 where MATCH(a,b) AGAINST("+search +(support vector)" IN BOOLEAN MODE);
|
select * from t1 where MATCH(a,b) AGAINST("+search +(support vector)" IN BOOLEAN MODE);
|
||||||
select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE);
|
select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN MODE);
|
||||||
|
select *, MATCH(a,b) AGAINST("support collections" IN BOOLEAN MODE) as x from t1;
|
||||||
delete from t1 where a like "MySQL%";
|
delete from t1 where a like "MySQL%";
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user