gpt4 book ai didi

Oracle 文本搜索对某些单词不起作用

转载 作者:行者123 更新时间:2023-12-04 05:15:05 26 4
gpt4 key购买 nike

我正在为我的项目使用 Oracle 的文本搜索。我在我的专栏上创建了一个 ctxsys.context 索引并插入了一个条目“你想要一些酒吗???”。我执行了查询

select guid, text, score(10) from triplet where contains (text, 'Would', 10) > 0

它没有给我任何结果。查询 'you' 和 'some' 也返回零结果。只有 'like' 和 'wine' 与记录匹配。 Oracle 是否将您视为停用词?我怎样才能让 Oracle 匹配这些词?谢谢。

最佳答案

所以,
我发现根据 oracle 中的停用词列表,查询的输出是完美的。

这些词可以在 ctxsys 包中找到,您可以使用以下命令查询停用词列表和停用词

SELECT * FROM CTX_STOPLISTS;
SELECT * FROM ctx_stopwords;

是的,oracle 将查询中的“你”、“会”视为停用词。
以下列表是默认停用词。
a   did     in  only    then    where
all do into onto there whether
almost does is or therefore which
also either it our these while
although for its ours they who
an from just s this whose
and had ll shall those why
any has me she though will
are have might should through with
as having Mr since thus would
at he Mrs so to yet
be her Ms some too you
because here my still until your
been hers no such ve yours
both him non t very
but his nor than was
by how not that we
can however of the were
could i on their what
d if one them when

如果您需要删除某些指定的词(或添加停用词),

(你需要 ** GRANT EXECUTE ON CTXSYS.CTX_DDL 给你**)
然后,你必须执行一个程序,
例子:
begin
ctx_ddl.remove_stopword('mystop_list','some');
ctx_ddl.remove_stopword('mystop_list','you');
end;

引用 link用于 ctx_ddl 包中的各种功能

您可以通过查询获得有关创建的 ctx 索引的完整描述,
select ctx_report.describe_index('yourindex_name') from dual;

关于Oracle 文本搜索对某些单词不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14390863/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com