QUERY_EXPERT_SEARCH Function

This function converts an end-user search query into the corresponding Oracle Text syntax, enabling advanced and precise searching capabilities.

It processes the search expression and generates a custom search query that can be used with Oracle Text for efficient and accurate text-based searches.

About Search Expression Syntax

The search expression provided as the parameter follows a specific syntax and can include the following elements:

Syntax

APEX_SEARCH.QUERY_EXPERT_SEARCH (
    p_search_expression IN VARCHAR2 )
RETURN CLOB;

Parameters

Parameter Description
p_search_expression End-user search query to convert to Oracle Text syntax. It can include various search operators and keywords.

Returns

This function returns the generated Oracle Text query based on the provided search expression.

Example 1

select query_expert_search('(red or white) "summer shorts"') from dual;

TEXT_QUERY
----------------------------------------
({red} ACCUM {white}) AND {summer shorts}

Example 2

select query_expert_search('fuzzy-: catz dogz') from dual;

TEXT_QUERY
----------------------------------------
FUZZY({catz},80,100,W) AND FUZZY({dogz},80,100,W)

Example 3

select query_expert_search('oracle^3 apex') from dual;

TEXT_QUERY
----------------------------------------
{oracle}*3 AND {apex}