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
69664dbf
Commit
69664dbf
authored
22 years ago
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge
Docs/manual.texi: SCCS merged
parents
dc2b6e45
19eb09ae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
13 deletions
+27
-13
Docs/manual.texi
Docs/manual.texi
+3
-0
myisam/ft_boolean_search.c
myisam/ft_boolean_search.c
+19
-13
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+3
-0
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+2
-0
No files found.
Docs/manual.texi
View file @
69664dbf
...
...
@@ -49215,6 +49215,9 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet
@item
Fixed bug in truncation operator of boolean fulltext search (wrong results
when there are only @code{+word*}'s in the query).
@item
Fixed bug in DROP DATABASE with symlink
@item
Fixed bug in EXPLAIN with LIMIT offset != 0
This diff is collapsed.
Click to expand it.
myisam/ft_boolean_search.c
View file @
69664dbf
...
...
@@ -200,25 +200,31 @@ void _ftb_init_index_search(FT_INFO *ftb)
{
ftbw
=
(
FTB_WORD
*
)(
ftb
->
queue
.
root
[
i
]);
if
(
ftbw
->
flags
&
FTB_FLAG_TRUNC
)
/* special treatment :(( */
if
(
ftbw
->
up
->
ythresh
>
test
(
ftbw
->
flags
&
FTB_FLAG_YES
))
if
(
ftbw
->
flags
&
FTB_FLAG_TRUNC
)
/* special treatment for truncation operator :((
1. +trunc* and there're other (not +trunc*) words
| no need to search in the index, it can never ADD new rows
| to the result, and to remove half-matched rows we do scan anyway
2. -trunc*
| same as 1.
3. trunc*
| We have to index-search for this prefix.
| It may cause duplicates, as in the index (sorted by <word,docid>)
| <aaaa,row1>
| <aabb,row2>
| <aacc,row1>
| Searching for "aa*" will find row1 twice...
*/
if
(
test
(
ftbw
->
flags
&
FTB_FLAG_NO
)
||
/* 2 */
(
test
(
ftbw
->
flags
&
FTB_FLAG_YES
)
&&
/* 1 */
ftbw
->
up
->
ythresh
-
ftbw
->
up
->
yweaks
>
1
))
/* 1 */
{
/* no need to search for this prefix in the index -
* it cannot ADD new matches, and to REMOVE half-matched
* rows we do scan anyway */
ftbw
->
docid
[
0
]
=
HA_POS_ERROR
;
ftbw
->
up
->
yweaks
++
;
continue
;
}
else
else
/* 3 */
{
/* We have to index-search for this prefix.
* It may cause duplicates, as in the index (sorted by <word,docid>)
* <aaaa,row1>
* <aabb,row2>
* <aacc,row1>
* Searching for "aa*" will find row1 twice...
*/
if
(
!
is_tree_inited
(
&
ftb
->
no_dupes
))
{
init_tree
(
&
ftb
->
no_dupes
,
0
,
0
,
sizeof
(
my_off_t
),
...
...
This diff is collapsed.
Click to expand it.
mysql-test/r/fulltext.result
View file @
69664dbf
...
...
@@ -67,6 +67,9 @@ 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
select * from t1 where MATCH a,b AGAINST ("+call* +coll*" IN BOOLEAN MODE);
a b
Full-text indexes are called collections
select * from t1 where MATCH a,b AGAINST ('"Now sUPPort"' IN BOOLEAN MODE);
a b
MySQL has now support for full-text search
...
...
This diff is collapsed.
Click to expand it.
mysql-test/t/fulltext.test
View file @
69664dbf
...
...
@@ -33,6 +33,8 @@ select * from t1 where MATCH(a,b) AGAINST("+search -(support vector)" IN BOOLEAN
select
*
,
MATCH
(
a
,
b
)
AGAINST
(
"support collections"
IN
BOOLEAN
MODE
)
as
x
from
t1
;
select
*
,
MATCH
(
a
,
b
)
AGAINST
(
"collections support"
IN
BOOLEAN
MODE
)
as
x
from
t1
;
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
"+call* +coll*"
IN
BOOLEAN
MODE
);
select
*
from
t1
where
MATCH
a
,
b
AGAINST
(
'"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 search" -"now support"'
IN
BOOLEAN
MODE
);
...
...
This diff is collapsed.
Click to expand it.
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