1 PACKAGE bis_gnrl_search_engine_pvt AUTHID CURRENT_USER AS
2 /* $Header: BISVGSES.pls 115.3 99/09/17 19:17:25 porting ship $ */
3
4 -- Exceptions
5 -- ********************************
6 e_noIndexDefined EXCEPTION;
7
8 -- Record and Table type declarations
9 -- ************************************************************
10 TYPE results_tbl_rec IS RECORD(folder_id pls_integer
11 ,folder_name varchar2(400)
12 ,folder_description varchar2(32000));
13 TYPE results_tbl_typ IS TABLE of results_tbl_rec INDEX BY BINARY_INTEGER;
14 TYPE keywords_tbl_typ IS TABLE of varchar2(32000) INDEX BY BINARY_INTEGER;
15
16 -- Constants declaration
17 -- ************************************************************
18 c_stem_optr CONSTANT varchar2(1) := '$';
19 c_accum_optr CONSTANT varchar2(1) := ',';
20 C_ROW_COUNT CONSTANT PLS_INTEGER := 40; -- To be used in case I need to show only so many at a time
21 C_MAX_HITS CONSTANT PLS_INTEGER := 200; -- To be used in case I need to stop searching after this
22
23 -- Procedure declarations
24 -- *************************************************************
25 -- Procedure : BUILD_QUERY = Procedure creates and runs the
26 -- Intermedia query to search the pre-indexed table.
27 -- The script BISPBVI.sql should be run first to create the
28 -- InterMedia Domain Index. It needs to be run in the Discoverer
29 -- eul schema that contains the Business Views in the specified language.
30 -- Parameters 1. p_api_version = version of this api
31 -- 2. p_eul = Name of the schema in which the
32 -- Intermedia domain index was created
33 -- 3. p_keywords_tbl = plsql table containing the search words
34 -- 4. x_results_tbl = plsql table containing the query results
35 -- 5. x_return_status = return status
36 -- 6. x_error_tbl = error table for debugging
37 -- *************************************************************
38 PROCEDURE build_query
39 ( p_api_version in pls_integer
40 ,p_eul in varchar2
41 ,p_keywords_tbl in BIS_GNRL_SEARCH_ENGINE_PVT.keywords_tbl_typ
42 ,x_results_tbl out BIS_GNRL_SEARCH_ENGINE_PVT.results_tbl_typ
43 ,x_return_status out varchar2
44 ,x_error_tbl out BIS_UTILITIES_PUB.Error_Tbl_Type
45 );
46
47 -- ****************************************************
48 -- Function: get_a_index_owner
49 -- Given an intermedia index name returns a possible
50 -- index owner, in order to get the Schema name
51 -- ****************************************************
52 Function get_a_index_owner( p_index in varchar2 )
53 RETURN VARCHAR2;
54
55
56 -- *****************************************************
57 -- Function : concat_string
58 -- Given a string, this concatenates the appropriate
59 -- number of single quotes on either sides, so that
60 -- it could be inserted into a quoted sql query string.
61 -- ****************************************************
62 Function concat_string (p_str in varchar2)
63 RETURN VARCHAR2;
64
65
66 -- *****************************************************
67 END bis_gnrl_search_engine_pvt;