Oracle TextText Retrieval: (you must first createContextOrCtxcatIndex, and then as follows) (you can alsoFromAdd, Score (10)To observe the score of the retrieved item)
1.Exact match of words
Select CBID, title (Column name) From emergency (Table Name) Where contains (title ,'About')> 0;YesfromTitleRetrieving words in"About"OfCBIDAndTitleField.
2. exact match of multiple words
select CBID, title form emergency where contains (title, ' about and request ')> 0; retrieve words from title " about " and " request " .
or select CBID, title form emergency where contains (title, ' about and request ' , null)> 0; it means the same as the preceding one. It is not a phrase but a word. Note that!
3. exact phrase match
select CBID, title ( column name ) from emergency ( table name ) Where contains (title, 'Doctor visits ', null)> 0; exact match doctor visits phrase
if you want to use and, or, minus and other reserved words, escape Character {} , for example, doctor {And} visits
4. search for words that are close to each other
select CBID, title ( column name ) from emergency ( table name ) Where contains (title, ' about near request ')> 0;
select CBID, title ( column name ) from emergency ( table name ) Where contains (title, 'near ( about , request ), 10) ')> 0; indicates that the specified two words are within 10 words
5.Use wildcards in search(Multi-character wildcard is%, The single-character wildcard is-)
Select CBID, title (Column name) From emergency (Table Name) Where contains (title, 'worker % ')> 0;YesWorkerIt can start with a single word and can be expanded at most.3Character
6.Fuzzy match search
Select CBID, title (Column name) From emergency (Table Name) Where contains (title ,'?About')> 0 ;(Add a question mark.)
7.UseAboutOperator to search the topic of a document
Select CBID, title form emergency where contains (title, 'about (Housing) ', Null)> 0;
Note that if you useContextThe text index is not updated when the base table is updated during indexing. To synchronize indexes, you must executeCtx_dllProgramPackageSync_indexThe process is as follows:
Execute ctx_dll.sync_index ('review _ Index ');