44.3 GET_SEARCHABLE_PHRASES Function

This function returns distinct phrases of 1-3 consecutive lower case words in the input strings. Stopwords in the given language are ignored and split phrases.

Note:

This is a PL/SQL only implementation of a very small subset of what Oracle Text provides. Consider using Oracle Text instead, if the features and performance of this function are not sufficient.

Syntax

FUNCTION GET_SEARCHABLE_PHRASES (
    p_strings   IN   apex_t_varchar2,
    p_max_words IN   PLS_INTEGER DEFAULT 3,
    p_language  IN   apex_t_varchar2    DEFAULT 'en' )
    RETURN apex_t_varchar2;
	

Parameters

Table 44-3 GET_SEARCHABLE_PHRASES Function Parameters

Parameters Description

p_string

The input string.

p_max_words

The maximum number of words in a phrase. The default is 3.

p_language

The language identifier for stopwords, defaults to "en". Supported values are "cn","de","en","es","fr","it","ja","ko","pt-br".

Example

Prints keywords in the given input string.

BEGIN
    sys.dbms_output.put_line (
        apex_string.join (
            apex_string.get_searchable_phrases (
                p_strings => apex_t_varchar2 (
                                  'Oracle APEX 19.1 is great.',
                                  'Low code as it should be!' )),
            ':' ));

END;
-> oracle:oracle apex:oracle apex 19.1:apex:apex 19.1:19.1:great:low:low code:code