Oracle CTX_QUERY
Version 21c

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose Context Administration
AUTHID CURRENT_USER
Constants
Name Data Type Value
 Query Processing Preferences
always_batch NUMBER 1
order_by NUMBER 2
postfilter_batch NUMBER 4
sav_incmplt_prg_hitcnt NUMBER 32
 Duration
DURATION_PERSISTENT NUMBER 0
DURATION_SESSION NUMBER 1
 Public
BROWSE_AFTER VARCHAR2(10) 'AFTER'
BROWSE_AROUND VARCHAR2(10) 'AROUND'
BROWSE_BEFORE VARCHAR2(10) 'BEFORE'
JSON_FORMAT NUMBER 1
XML_FORMAT NUMBER 0
Data Types -- PUBLIC DATA STRUCTURES
TYPE browse_rec IS RECORD (
word      VARCHAR2(256) NULL,
doc_count NUMBER(38,0)  NULL);

TYPE browse_tab IS TABLE OF browse_rec INDEX BY BINARY_INTEGER;
Dependencies
ALL_INDEXES DRIDISP DRVDOC
ALL_TABLES DRIG DRVIMR
CTX_DDL DRILIST DRVUTL
CTX_USER_INDEX_PARTITIONS DRIUTL DRVXMD
DBMS_ASSERT DRIXMD DR_DEF
DBMS_LOB DRUE ODCIVARCHAR2LIST
DBMS_STANDARD DRVDDL PLITBLM
DRIACC DRVDISP  
Documented No
First Available Not known
Security Model Owned by CTXSYS with EXECUTE granted to PUBLIC and MDSYS
Source {ORACLE_HOME}/ctx/admin/dr0query.pkh
{ORACLE_HOME}/ctx/admin/dr0query.plb
Subprograms
 
BROWSE_WORDS
Undocumented

Overload 1
ctx_query.browse_words(
index_name IN VARCHAR2,
seed       IN VARCHAR2,
restab     IN VARCHAR2,
browse_id  IN NUMBER   DEFAULT 0,
numwords   IN NUMBER   DEFAULT 10,
direction  IN VARCHAR2 DEFAULT BROWSE_AROUND,
part_name  IN VARCHAR2 DEFAULT NULL,
token_type IN NUMBER   DEFAULT 0);
TBD
Overload 2 ctx_query.browse_words(
index_name IN            VARCHAR2,
seed       IN            VARCHAR2,
resarr     IN OUT NOCOPY BROWSE_TAB,
numwords   IN            NUMBER   DEFAULT 10,
direction  IN            VARCHAR2 DEFAULT BROWSE_AROUND,
part_name  IN            VARCHAR2 DEFAULT NULL,
token_type IN            NUMBER DEFAULT 0);
TBD
 
CHK_TXNQRY_DISBL_SWITCH
Undocumented ctx_query.chk_txnqry_disbl_switch RETURN NUMBER;
SELECT ctxsys.ctx_query.chk_txnqry_disbl_switch
FROM dual;

CHK_TXNQRY_DISBL_SWITCH
-----------------------
                      1
 
CHK_XPATH
Takes an xpath expression and return an expression context can process ctx_query.chk_xpath(
index_name IN VARCHAR2,
text_query IN VARCHAR2,
part_name  IN VARCHAR2 DEFAULT NULL)
RETURN VARCHAR2;
TBD
 
COUNT_HITS
Count text hits returned by a VARCHAR2 query ctx_query.count_hits_clob_query(
index_name IN VARCHAR2,
text_query IN VARCHAR2,
exact      IN BOOLEAN  DEFAULT TRUE,
part_name  IN VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
TBD
 
COUNT_HITS_CLOB_QUERY
Count text hits returned by a CLOB query ctx_query.count_hits_clob_query(
index_name IN VARCHAR2,
text_query IN CLOB,
exact      IN BOOLEAN  DEFAULT TRUE,
part_name  IN VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
TBD
 
DISABLE_TRANSACTIONAL
Returns the value of the flag 'disable_transactional_query'

Overload 1
ctx_query.disable_transactional RETURN BOOLEAN;
See Overload 2 demo below.
Sets or resets the disable_transactional_query flag

Overload 2
ctx_query.disable_transactional(val IN BOOLEAN);
BEGIN
  IF ctxsys.ctx_query.disable_transactional THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
F

PL/SQL procedure successfully completed.



exec ctxsys.ctx_query.disable_transactional(TRUE);

PL/SQL procedure successfully completed.

BEGIN
  IF ctxsys.ctx_query.disable_transactional THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
T

PL/SQL procedure successfully completed.
 
EXPLAIN
Explain plans, but does not execute, a query input as a VARCHAR2 ctx_query.explain(
index_name    IN VARCHAR2,
text_query    IN VARCHAR2,
explain_table IN VARCHAR2,
sharelevel    IN NUMBER   DEFAULT 0,
explain_id    IN VARCHAR2 DEFAULT NULL,
part_name     IN VARCHAR2 DEFAULT NULL);
TBD
 
EXPLAIN_CLOB_QUERY
Explain plans, but does not execute, a query input as a CLOB ctx_query.explain_clob_query(
index_name    IN VARCHAR2,
text_query    IN CLOB,
explain_table IN VARCHAR2,
sharelevel    IN NUMBER   DEFAULT 0,
explain_id    IN VARCHAR2 DEFAULT NULL,
part_name     IN VARCHAR2 DEFAULT NULL);
TBD
 
FCONTAINS
Undocumented ctx_query.fcontains(
text_value  IN VARCHAR2,
text_query  IN VARCHAR2,
policy_name IN VARCHAR2)
RETURN NUMBER;
TBD
 
GEN_RS_ONLY_IF_LAST_SEQ
Sets or resets the rs_if_last_seq flag

Overload 1
ctx_query.gen_rs_only_if_last_seq(val IN BOOLEAN);
See Overload 2 demo below.
Returns the value of the rs_if_last_seq flag

Overload 2
ctx_query.gen_rs_only_if_last_seq RETURN INTEGER;
SELECT ctxsys.ctx_query.gen_rs_only_if_last_seq
FROM dual;

GEN_RS_ONLY_IF_LAST_SEQ
-----------------------
                      0


exec ctxsys.ctx_query.gen_rs_only_if_last_seq(TRUE);

PL/SQL procedure successfully completed.

SELECT ctxsys.ctx_query.gen_rs_only_if_last_seq
FROM dual;

GEN_RS_ONLY_IF_LAST_SEQ
-----------------------
                      1
 
GEN_RS_ONLY_ON_LAST_SEQ
Sets or resets the rs_on_last_seq flag

Overload 1
ctx_query.gen_rs_only_on_last_seq(val IN BOOLEAN);
See Overload 2 demo below.
Returns the value of rs_on_last_seq flag

Overload 2
ctx_query.gen_rs_only_only_on_last_seq RETURN INTEGER;
SELECT ctxsys.ctx_query.gen_rs_only_on_last_seq
FROM dual;

GEN_RS_ONLY_ON_LAST_SEQ
-----------------------
                      0


exec ctxsys.ctx_query.gen_rs_only_on_last_seq(TRUE);

PL/SQL procedure successfully completed.

SELECT ctxsys.ctx_query.gen_rs_only_on_last_seq
FROM dual;

GEN_RS_ONLY_ON_LAST_SEQ
-----------------------
                      1
 
HFEEDBACK
Evaluate a query in a VARCHAR2 and returns the Hierarchical Query Feedback in the feedback table ctx_query.hFeedback(
index_name     IN VARCHAR2,
text_query     IN VARCHAR2,
feedback_table IN VARCHAR2,
sharelevel     IN NUMBER   DEFAULT 0,
feedback_id    IN VARCHAR2 DEFAULT NULL,
part_name      IN VARCHAR2 DEFAULT NULL);
PRAGMA SUPPLEMENTAL_LOG_DATA(hfeedback, AUTO);
TBD
 
HFEEDBACK_CLOB_QUERY
Evaluate a query in a CLOB and returns the Hierarchical Query Feedback in the feedback table ctx_query.hfeedback_clob_query(
index_name     IN VARCHAR2,
text_query     IN CLOB,
feedback_table IN VARCHAR2,
sharelevel     IN NUMBER   DEFAULT 0,
feedback_id    IN VARCHAR2 DEFAULT NULL,
part_name      IN VARCHAR2 DEFAULT NULL);
PRAGMA SUPPLEMENTAL_LOG_DATA(hfeedback_clob_query, AUTO);
TBD
 
PREFERENCE
Returns the query preference

Overload 1
ctx_query.preference RETURN NUMBER;
See Overload 2 demo below.
Sets the query preference to the passed in value

Overload 2
ctx_query.preference(val IN NUMBER);
SELECT ctxsys.ctx_query.preference
FROM dual;

PREFERENCE
----------
         0


exec ctxsys.ctx_query.preference(1);

PL/SQL procedure successfully completed.

SELECT ctxsys.ctx_query.preference
FROM dual;

PREFERENCE
----------
         1
 
REMOVE_SQE
Deletes a stored query ctx_query.remove_sqe(query_name IN VARCHAR2);
TBD
 
RESULT_SET
Undocumented ctx_query.result_set(
index_name            IN            VARCHAR2,
query                 IN            VARCHAR2,
result_set_descriptor IN            CLOB,
result_set            IN OUT NOCOPY CLOB,
part_name             IN            VARCHAR2 DEFAULT NULL,
format                IN            NUMBER   DEFAULT XML_FORMAT,
parallel_degree       IN            NUMBER   DEFAULT 1);
TBD
 
RESULT_SET_CLOB_QUERY
Undocumented ctx_query.result_set_clob_query(
index_name            IN            VARCHAR2,
query                 IN            CLOB,
result_set_descriptor IN            CLOB,
result_set            IN OUT NOCOPY CLOB,
part_name             IN            VARCHAR2 DEFAULT NULL,
parallel_degree       IN            NUMBER   DEFAULT 1);
TBD
 
RESULT_SET_PX
Undocumented ctx_query.result_set_px(
xp_cur   IN drvddl.popcurtyp,
idxid    IN NUMBER,
idxownid IN NUMBER,
idxowner IN VARCHAR2,
idxname  IN VARCHAR2,
query    IN VARCHAR2,
rs_dsp   IN CLOB)
RETURN sys.odcivarchar2list PIPELINED PARALLEL_ENABLE (partition xp_cur by hash (num));
TBD
 
STORE_CTXIN_CURSOR
Undocumented ctx_query.store_ctxin_cursor(ctxin_cursor IN OUT SYS_REFCURSOR )RETURN SYS_REFCURSOR;
TBD
 
STORE_SQE
Creates a stored query from a VARCHAR2 ctx_query.store_sqe(
query_name IN VARCHAR2,
text_query IN VARCHAR2,
duration   IN NUMBER DEFAULT DURATION_PERSISTENT);
TBD
 
STORE_SQE_CLOB_QUERY
Creates a stored query from a CLOB ctx_query.store_sqe_clob_query(
query_name IN VARCHAR2,
text_query IN CLOB,
duration   IN NUMBER DEFAULT DURATION_PERSISTENT);
TBD

Related Topics
Built-in Functions
Built-in Packages
Database Security
CTX_ADM
CTX_ANL
CTX_CATSEARCH
CTX_CLS
CTX_CONTAINS
CTX_DDL
CTX_ENTITY
CTX_MATCHES
CTX_OUTPUT
CTX_REPORT
CTX_TREE
CTX_ULEXER
CTX_XPCONTAINS
What's New In 19c
What's New In 20c-21c

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2021 Daniel A. Morgan All Rights Reserved
  DBSecWorx