2

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

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

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

4

2 回答 2

3

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

这些词可以在 ctxsys 包中找到,您可以使用

SELECT * FROM CTX_STOPLISTS;
SELECT * FROM ctx_stopwords;

是的,oracle 将您的查询中的“you”、“would”视为停用词。以下列表是默认停用词。

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;

请参阅ctx_ddl 包中各种功能的链接

您可以通过查询获得有关创建的 ctx 索引的完整描述,

select ctx_report.describe_index('yourindex_name') from dual;
于 2013-01-21T04:34:35.727 回答
0

文档

在“4.1.5 查询停用词”段落中,您可以获得一些有用的信息:)

于 2013-01-18T08:31:58.707 回答