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
8e714e9f
Commit
8e714e9f
authored
Dec 11, 2001
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
committing to be able to pull
parent
22f71c2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
myisam/ft_boolean_search.c
myisam/ft_boolean_search.c
+5
-3
No files found.
myisam/ft_boolean_search.c
View file @
8e714e9f
...
...
@@ -226,11 +226,12 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query,
return
ftb
;
}
void
_ftb_climb_the_tree
(
FTB_WORD
*
ftbw
,
my_off_t
curdoc
)
void
_ftb_climb_the_tree
(
FTB_WORD
*
ftbw
)
{
FTB_EXPR
*
ftbe
;
float
weight
=
ftbw
->
weight
;
int
yn
=
ftbw
->
yesno
;
my_off_t
curdoc
=
ftbw
->
docid
;
for
(
ftbe
=
ftbw
->
up
;
ftbe
;
ftbe
=
ftbe
->
up
)
{
...
...
@@ -303,7 +304,7 @@ int ft_boolean_read_next(FT_INFO *ftb, char *record)
{
while
(
curdoc
==
(
ftbw
=
(
FTB_WORD
*
)
queue_top
(
&
ftb
->
queue
))
->
docid
)
{
_ftb_climb_the_tree
(
ftbw
,
curdoc
);
_ftb_climb_the_tree
(
ftbw
);
/* update queue */
r
=
_mi_search
(
info
,
keyinfo
,
(
uchar
*
)
ftbw
->
word
,
USE_WHOLE_KEY
,
...
...
@@ -396,12 +397,13 @@ float ft_boolean_find_relevance(FT_INFO *ftb, byte *record, uint length)
for
(
i
=
1
;
i
<=
ftb
->
queue
.
elements
;
i
++
)
{
ftbw
=
(
FTB_WORD
*
)(
ftb
->
queue
.
root
[
i
]);
ftbw
->
docid
=
docid
;
ptree
.
custom_arg
=
(
void
*
)(
ftbw
->
trunc
);
word
.
pos
=
ftbw
->
word
+
1
;
word
.
len
=
ftbw
->
len
-
1
;
if
(
tree_search
(
&
ptree
,
&
word
))
{
/* found! */
_ftb_climb_the_tree
(
ftbw
,
docid
);
_ftb_climb_the_tree
(
ftbw
);
}
else
{
/* not found! */
...
...
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