Oracle Text Search不会处理某些单词

时间:2013-01-18 00:55:59

标签: oracle full-text-search

我正在使用Oracle的Text Search来完成我的项目。我在我的列上创建了一个ctxsys.context索引,并插入了一个条目“你想要一些葡萄酒???”。我执行了查询

select guid, text, score(10) from triplet where contains (text, 'Would', 10) > 0
它没有给我任何结果。查询“你”和“某些”也会返回零结果。只有'喜欢'和'葡萄酒'匹配记录。甲骨文是否会考虑你,有些人会停止说话吗?我怎样才能让Oracle匹配这些单词?谢谢。

2 个答案:

答案 0 :(得分:3)

所以, 我发现根据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     

如果你需要删除一些指定的单词(或添加停用词),

(你需要在CTXSYS.CTX_DDL上执行** GRANT EXECUTE **) 那么,你要执行一个程序, 例如:

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;

答案 1 :(得分:0)

查看docs

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