Skip to content

Commit

Permalink
Add Babelfish full text files (#186) (#221)
Browse files Browse the repository at this point in the history
We need to add full text configurations to make Babelfish's full text
search behaviors match more closely with SQL Server. This commit adds a
stopwords file and a synonym file that are used by Babelfish to create
its full text configurations.

Task: BABEL-4246
Signed-off-by: Robin Li <[email protected]>
  • Loading branch information
roshan0708 authored Oct 25, 2023
1 parent cc4936b commit 4493423
Show file tree
Hide file tree
Showing 4 changed files with 985 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/backend/snowball/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ install: all installdirs install-lib
while [ "$$#" -gt 0 ] ; \
do \
lang=$$1; shift; shift; \
$(INSTALL_DATA) $(srcdir)/stopwords/tsql_contains.stop '$(DESTDIR)$(datadir)/$(DICTDIR)' ; \
if [ -s $(srcdir)/stopwords/$${lang}.stop ] ; then \
$(INSTALL_DATA) $(srcdir)/stopwords/$${lang}.stop '$(DESTDIR)$(datadir)/$(DICTDIR)' ; \
fi \
Expand All @@ -165,6 +166,7 @@ uninstall: uninstall-lib
while [ "$$#" -gt 0 ] ; \
do \
lang=$$1; shift; shift; \
rm -f '$(DESTDIR)$(datadir)/$(DICTDIR)/'tsql_contains.stop ; \
if [ -s $(srcdir)/stopwords/$${lang}.stop ] ; then \
rm -f '$(DESTDIR)$(datadir)/$(DICTDIR)/'$${lang}.stop ; \
fi \
Expand Down
154 changes: 154 additions & 0 deletions src/backend/snowball/stopwords/tsql_contains.stop
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
$
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
about
after
all
also
an
and
another
any
are
as
at
be
because
been
before
being
between
both
but
by
came
can
come
could
did
do
does
each
else
for
from
get
got
had
has
have
he
her
here
him
himself
his
how
if
in
into
is
it
its
just
like
make
many
me
might
more
most
much
must
my
never
no
now
of
on
only
or
other
our
out
over
re
said
same
see
should
since
so
some
still
such
take
than
that
the
their
them
then
there
these
they
this
those
through
to
too
under
up
use
very
want
was
way
we
well
were
what
when
where
which
while
who
will
with
would
you
your
3 changes: 2 additions & 1 deletion src/backend/tsearch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ DICTFILES=synonym_sample.syn thesaurus_sample.ths \
hunspell_sample.affix \
ispell_sample.affix ispell_sample.dict \
hunspell_sample_long.affix hunspell_sample_long.dict \
hunspell_sample_num.affix hunspell_sample_num.dict
hunspell_sample_num.affix hunspell_sample_num.dict \
irregular_verbs.syn

# Local paths to dictionaries files
DICTFILES_PATH=$(addprefix dicts/,$(DICTFILES))
Expand Down
Loading

0 comments on commit 4493423

Please sign in to comment.