Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
7e616128
Commit
7e616128
authored
Nov 08, 2001
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug in relevance calculation fixed
parent
74e044c0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
myisam/ft_boolean_search.c
myisam/ft_boolean_search.c
+1
-2
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+7
-0
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+1
-0
No files found.
myisam/ft_boolean_search.c
View file @
7e616128
...
@@ -260,15 +260,14 @@ void _ftb_climb_the_tree(FTB_WORD *ftbw, my_off_t curdoc)
...
@@ -260,15 +260,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
;
}
}
}
}
...
...
mysql-test/r/fulltext.result
View file @
7e616128
...
@@ -48,6 +48,13 @@ Full-text search in MySQL implements vector space model
...
@@ -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 (
...
...
mysql-test/t/fulltext.test
View file @
7e616128
...
@@ -21,6 +21,7 @@ select * from t1 where MATCH(a,b) AGAINST("+support +collections" IN BOOLEAN MOD
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment