---
title: "oracle 全文检索"
author: "yanfei133"
date: "2011-05-31T22:27:50Z"
tags: ["Oracle", "全文检索"]
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2011-05-31T22:28:48Z"
id: 1066716
url: "https://yanfei133.iteye.com/blog/1066716"
---

select t.\*, t.rowid from test t where t.mycomment  
 like '%缩放%'

BEGIN  
  ctx\_ddl.drop\_preference ('my\_lexer');  
  ctx\_ddl.create\_preference ('my\_lexer', 'chinese\_vgram\_lexer');  
  --ctx\_ddl.create\_preference ('my\_lexer', 'CHINESE\_LEXER');  
   
END;

CREATE INDEX  myindex ON test(mycomment) indextype is ctxsys.context parameters('lexer my\_lexer');

drop index myindex;

select t.\*, t.rowid from test t where contains(t.mycomment,'%COM%')&gt;0;

select * from DR$myindex$I;