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
663c7a81
Commit
663c7a81
authored
Dec 11, 2001
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
committing to be able to pull
parent
7630970e
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 @
663c7a81
...
@@ -226,11 +226,12 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query,
...
@@ -226,11 +226,12 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query,
return
ftb
;
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
;
FTB_EXPR
*
ftbe
;
float
weight
=
ftbw
->
weight
;
float
weight
=
ftbw
->
weight
;
int
yn
=
ftbw
->
yesno
;
int
yn
=
ftbw
->
yesno
;
my_off_t
curdoc
=
ftbw
->
docid
;
for
(
ftbe
=
ftbw
->
up
;
ftbe
;
ftbe
=
ftbe
->
up
)
for
(
ftbe
=
ftbw
->
up
;
ftbe
;
ftbe
=
ftbe
->
up
)
{
{
...
@@ -303,7 +304,7 @@ int ft_boolean_read_next(FT_INFO *ftb, char *record)
...
@@ -303,7 +304,7 @@ int ft_boolean_read_next(FT_INFO *ftb, char *record)
{
{
while
(
curdoc
==
(
ftbw
=
(
FTB_WORD
*
)
queue_top
(
&
ftb
->
queue
))
->
docid
)
while
(
curdoc
==
(
ftbw
=
(
FTB_WORD
*
)
queue_top
(
&
ftb
->
queue
))
->
docid
)
{
{
_ftb_climb_the_tree
(
ftbw
,
curdoc
);
_ftb_climb_the_tree
(
ftbw
);
/* update queue */
/* update queue */
r
=
_mi_search
(
info
,
keyinfo
,
(
uchar
*
)
ftbw
->
word
,
USE_WHOLE_KEY
,
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)
...
@@ -396,12 +397,13 @@ float ft_boolean_find_relevance(FT_INFO *ftb, byte *record, uint length)
for
(
i
=
1
;
i
<=
ftb
->
queue
.
elements
;
i
++
)
for
(
i
=
1
;
i
<=
ftb
->
queue
.
elements
;
i
++
)
{
{
ftbw
=
(
FTB_WORD
*
)(
ftb
->
queue
.
root
[
i
]);
ftbw
=
(
FTB_WORD
*
)(
ftb
->
queue
.
root
[
i
]);
ftbw
->
docid
=
docid
;
ptree
.
custom_arg
=
(
void
*
)(
ftbw
->
trunc
);
ptree
.
custom_arg
=
(
void
*
)(
ftbw
->
trunc
);
word
.
pos
=
ftbw
->
word
+
1
;
word
.
pos
=
ftbw
->
word
+
1
;
word
.
len
=
ftbw
->
len
-
1
;
word
.
len
=
ftbw
->
len
-
1
;
if
(
tree_search
(
&
ptree
,
&
word
))
if
(
tree_search
(
&
ptree
,
&
word
))
{
/* found! */
{
/* found! */
_ftb_climb_the_tree
(
ftbw
,
docid
);
_ftb_climb_the_tree
(
ftbw
);
}
}
else
else
{
/* not found! */
{
/* 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