首页 > 代码库 > 全文检索- Oracle/MySql/达梦

全文检索- Oracle/MySql/达梦

简单使用语法: 

MySql:

ALTER TABLE dataset_ods ENGINE = MyISAM;ALTER TABLE dataset_ods ADD FULLTEXT (abstract);SELECT * FROM dataset_ods  WHERE MATCH(abstract) AGAINST(XX);

 

Oracle:

CREATE INDEX FullTextIndex_dataset_ods ON dataset_ods( ABSTRACT ) INDEXTYPE is CTXSYS.CONTEXT;BEGIN   ctx_ddl.sync_index (fulltextindex_dataset_ods, 2M);  ctx_ddl.optimize_index (fulltextindex_dataset_ods, full,null,null,null);END;SELECT * FROM dataset_ods  WHERE CONTAINS (ABSTRACT ,XX)>0

 

达梦:

create context index FullTextIndex_dataset_ods on dataset_ods(ABSTRACT)LEXER DEFAULT_LEXER;DM管理工具->全文检索->填充SELECT * FROM dataset_ods WHERE CONTAINS (ABSTRACT,XX)


 

全文检索- Oracle/MySql/达梦