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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
7759360d
Commit
7759360d
authored
Feb 22, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ftb +(+(many -parens)) bug fixed
parent
ecf6eeca
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
myisam/ft_boolean_search.c
myisam/ft_boolean_search.c
+5
-3
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+4
-0
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+3
-1
No files found.
myisam/ft_boolean_search.c
View file @
7759360d
...
@@ -55,8 +55,9 @@ static double _nwghts[11]=
...
@@ -55,8 +55,9 @@ static double _nwghts[11]=
static
double
*
nwghts
=
_nwghts
+
5
;
/* nwghts[i] = -0.5*1.5**i */
static
double
*
nwghts
=
_nwghts
+
5
;
/* nwghts[i] = -0.5*1.5**i */
#define FTB_FLAG_TRUNC 1
/* MUST be 1 */
#define FTB_FLAG_TRUNC 1
/* MUST be 1 */
#define FTB_FLAG_YES 2
/* These two - YES and NO */
#define FTB_FLAG_YES 2
/* no two from these three */
#define FTB_FLAG_NO 4
/* should NEVER be set both */
#define FTB_FLAG_NO 4
/* YES, NO, WONLY */
#define FTB_FLAG_WONLY 8
/* should be ever set both */
typedef
struct
st_ftb_expr
FTB_EXPR
;
typedef
struct
st_ftb_expr
FTB_EXPR
;
struct
st_ftb_expr
struct
st_ftb_expr
...
@@ -444,7 +445,8 @@ static void _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_
...
@@ -444,7 +445,8 @@ static void _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_
ftbe
->
cur_weight
+=
weight
;
ftbe
->
cur_weight
+=
weight
;
if
(
ftbe
->
yesses
<
ythresh
)
if
(
ftbe
->
yesses
<
ythresh
)
break
;
break
;
yn
=
(
ftbe
->
yesses
++
==
ythresh
)
?
ftbe
->
flags
:
0
;
if
(
!
(
yn
&
FTB_FLAG_WONLY
))
yn
=
(
ftbe
->
yesses
++
==
ythresh
)
?
ftbe
->
flags
:
FTB_FLAG_WONLY
;
weight
*=
ftbe
->
weight
;
weight
*=
ftbe
->
weight
;
}
}
}
}
...
...
mysql-test/r/fulltext.result
View file @
7759360d
...
@@ -117,6 +117,10 @@ MySQL has now support for full-text search
...
@@ -117,6 +117,10 @@ MySQL has now support for full-text search
select * from t1 where MATCH a,b AGAINST ('"text i"' IN BOOLEAN MODE);
select * from t1 where MATCH a,b AGAINST ('"text i"' IN BOOLEAN MODE);
a b
a b
Full-text indexes are called collections
Full-text indexes are called collections
select * from t1 where MATCH a,b AGAINST ('+(support collections) +foobar*' IN BOOLEAN MODE);
a b
select * from t1 where MATCH a,b AGAINST ('+(+(support collections)) +foobar*' IN BOOLEAN MODE);
a b
select * from t1 where MATCH a AGAINST ("search" IN BOOLEAN MODE);
select * from t1 where MATCH a AGAINST ("search" IN BOOLEAN MODE);
a b
a b
Full-text search in MySQL implements vector space model
Full-text search in MySQL implements vector space model
...
...
mysql-test/t/fulltext.test
View file @
7759360d
...
@@ -18,7 +18,6 @@ select * from t1 where MATCH(a,b) AGAINST ("collections");
...
@@ -18,7 +18,6 @@ select * from t1 where MATCH(a,b) AGAINST ("collections");
select
*
from
t1
where
MATCH
(
a
,
b
)
AGAINST
(
"indexes"
);
select
*
from
t1
where
MATCH
(
a
,
b
)
AGAINST
(
"indexes"
);
select
*
from
t1
where
MATCH
(
a
,
b
)
AGAINST
(
"indexes collections"
);
select
*
from
t1
where
MATCH
(
a
,
b
)
AGAINST
(
"indexes collections"
);
# add_ft_keys() tests
# add_ft_keys() tests
explain
select
*
from
t1
where
MATCH
(
a
,
b
)
AGAINST
(
"collections"
);
explain
select
*
from
t1
where
MATCH
(
a
,
b
)
AGAINST
(
"collections"
);
...
@@ -54,6 +53,9 @@ select * from t1 where MATCH a,b AGAINST ('"text search" -"now support"' IN BOOL
...
@@ -54,6 +53,9 @@ select * from t1 where MATCH a,b AGAINST ('"text search" -"now support"' IN BOOL
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'"text search" +"now support"'
IN
BOOLEAN
MODE
);
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'"text search" +"now support"'
IN
BOOLEAN
MODE
);
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'"text i"'
IN
BOOLEAN
MODE
);
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'"text i"'
IN
BOOLEAN
MODE
);
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'+(support collections) +foobar*'
IN
BOOLEAN
MODE
);
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'+(+(support collections)) +foobar*'
IN
BOOLEAN
MODE
);
# boolean w/o index:
# boolean w/o index:
select
*
from
t1
where
MATCH
a
AGAINST
(
"search"
IN
BOOLEAN
MODE
);
select
*
from
t1
where
MATCH
a
AGAINST
(
"search"
IN
BOOLEAN
MODE
);
...
...
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