Monday, January 5, 2009

Querying with Oracle Text [CTXCAT INDEX]

When you create an index of type CTXCAT, you must use the CATSEARCH operator to issue your query. The operators available for CATSEARCH queries are limited to logical operations such as AND or OR. The operators you can use to define your structured criteria are greater than, less than, equality, BETWEEN, and IN

SELECT FROM auction WHERE CATSEARCH(title, 'camera', 'order by bid_close desc')>0;

For example, assuming that category_id and bid_close have a sub-index in the ctxcat index for the AUCTION table, you can issue the following structured query:

SELECT FROM auction WHERE CATSEARCH(title, 'camera', 'category_id=99 order by bid_close desc')> 0;

No comments:

search engine

Custom Search