1 package CTX_DDL authid current_user as
2
3 OPTLEVEL_FAST constant varchar2(4) := 'FAST';
4 OPTLEVEL_FULL constant varchar2(4) := 'FULL';
5 OPTLEVEL_TOKEN constant varchar2(5) := 'TOKEN';
6 OPTLEVEL_TOKEN_TYPE constant varchar2(10) := 'TOKEN_TYPE';
7 OPTLEVEL_REBUILD constant varchar2(7) := 'REBUILD';
8 OPTLEVEL_MERGE constant varchar2(5) := 'MERGE';
9 MAXTIME_UNLIMITED constant number := 2147483647;
10
11
12 LOCK_WAIT constant number := 0;
13 LOCK_NOWAIT constant number := 1;
14 LOCK_NOWAIT_ERROR constant number := 2;
15
16 TYPE split_rec is RECORD(
17 new_sec varchar2(64) default NULL,
18 idval varchar2(100) default NULL
19 );
20
21 TYPE sec_rec is RECORD(
22 secname varchar2(500) default NULL,
23 sectag varchar2(500) default NULL
24 );
25
26 TYPE split_tab is table of split_rec index by binary_integer;
27 TYPE sec_tab is table of sec_rec index by binary_integer;
28
29 -- bug 9442793: flag for implicit commit
30 preference_implicit_commit boolean := TRUE;
31
32 --
33 -- Public procedure prototypes
34 --
35
36
37 /*---------------------------- create_preference ----------------------------*/
38 /*
39 NAME
40 create_preference
41 DESCRIPTION
42 A preference is created to customized a tile (framework object).
43
44 A preference references a framework object. It describes how a referenced
45 object is to be customized.
46
47 This procedure validates the preference attribute settings and raise
48 an exveption if incorrect attribute settings are found.
49
50 ARGUMENTS
51 preference_name - preference name, this is structured as
52 [OWNER.]PREFERENCE_NAME
53 object_name - object name
54 NOTES
55 a) this procedure clears out the list of attributes created (by
56 calling the set_attribute()) prior to calling this procedure.
57 EXCEPTIONS
58
59 RETURNS
60 none
61 */
62 procedure create_preference(
63 preference_name in varchar2,
64 object_name in varchar2);
65
66 /*---------------------------- drop_preference ----------------------------*/
67 /*
68 NAME
69 drop_preference
70 DESCRIPTION
71 delete the preference specified in 'name' from TexTile dictionary.
72 This procedure will raise an exception if the preference is referenced
73 in any policy.
74 ARGUMENTS
75 name - preference name
76 NOTES
77 NONE
78 EXCEPTIONS
79
80 */
81 procedure drop_preference(preference_name in varchar2 );
82
83 /*---------------------------- set_attribute ----------------------------*/
84 /*
85 NAME
86 set_attribute
87 DESCRIPTION
88 add an item into the attribute name/value buffer for preference creation.
89 The caller calls this procedure to set value for a named preference
90 attribute.
91 the create_preference() procedure make used of all values set by this
92 procedure when creating the preference. The attribute name/value buffer
93 is cleaned up once the preference is created.
94
95 ARGUMENTS
96 name - preference attribute name
97 value - the attribute value
98 NOTES
99
100 EXCEPTIONS
101
102 */
103 procedure set_attribute(preference_name in varchar2,
104 attribute_name in varchar2,
105 attribute_value in varchar2);
106
107 /*-------------------------- unset_attribute ----------------------------*/
108
109 procedure unset_attribute(preference_name in varchar2,
110 attribute_name in varchar2);
111
112 /*---------------------------- set_section_attribute -----------------------*/
113 /*
114 NAME
115 set_section_attribute
116 DESCRIPTION
117 add a section specific attribute
118 ARGUMENTS
119 group_name - section group name
120 section_name - section name
121 attribute_name - section attribute name
122 attribute_value - section attribute value
123 NOTES
124
125 EXCEPTIONS
126
127 */
128 procedure set_section_attribute(group_name in varchar2,
129 section_name in varchar2,
130 attribute_name in varchar2,
131 attribute_value in varchar2);
132
133 /*-------------------------- unset_section_attribute -----------------------*/
134
135 procedure unset_section_attribute(group_name in varchar2,
136 section_name in varchar2,
137 attribute_name in varchar2);
138
139 /*-------------------- create_section_group ---------------------------*/
140 /*
141 NAME
142 create_section_group
143
144 DESCRIPTION
145 create a new section group.
146
147 * section group name is unique within an owner.
148 * Only CTXAPP and CTXADMIN users can create a section group.
149
150 ARGUMENTS
151 group_name - section group name , [user.]section_group_name
152 group_type - section group type ( from ctx_classes )
153 NOTES
154
155 EXCEPTIONS
156
157 */
158 PROCEDURE create_section_group(
159 group_name in varchar2
160 , group_type in varchar2
161 );
162
163 /*-------------------- drop_section_group ---------------------------*/
164 /*
165 NAME
166 drop_section_group
167
168 DESCRIPTION
169 drop a new group. Only CTXAPP and CTXADMIN can drop a section
170 group, moreover, they can only drop their own section group.
171
172 ARGUMENTS
173 group_name - section group name, [user.]section_group_name
174
175 NOTES
176
177 EXCEPTIONS
178
179 */
180 PROCEDURE drop_section_group(
181 group_name in varchar2
182 );
183
184 /*-------------------------- set_sec_grp_attr --------------------*/
185 /*
186 NAME
187 set_sec_grp_attr
188 DESCRIPTION
189 add a section group attribute (if it does not exist) and set its value.
190 raise error if section group attribute exists already.
191
192 ARGUMENTS
193 group_name - section group name
194 attribute_name - section group attribute name
195 attribute_value - section group attribute value
196 NOTES
197
198 EXCEPTIONS
199
200 */
201 procedure set_sec_grp_attr(group_name in varchar2,
202 attribute_name in varchar2,
203 attribute_value in varchar2);
204 PRAGMA SUPPLEMENTAL_LOG_DATA(set_sec_grp_attr, AUTO);
205
206 /*-------------------------- add_sec_grp_attr_val --------------------*/
207 /*
208 NAME
209 add_sec_grp_attr_val
210 DESCRIPTION
211 add a section group attribute value to the list of values of an already
212 existing section group attribute. This API must be called after
213 set_sec_grp_attr. There is no need to call this API for section group
214 attributes that are single valued, since a single call to
215 set_sec_grp_attr will suffice for this case.
216
217 ARGUMENTS
218 group_name - section group name
219 attribute_name - section group attribute name
220 attribute_value - section group attribute value
221 NOTES
222
223 EXCEPTIONS
224
225 */
226 procedure add_sec_grp_attr_val(group_name in varchar2,
227 attribute_name in varchar2,
228 attribute_value in varchar2);
229
230 /*-------------------------- rem_sec_grp_attr_val --------------------*/
231 /*
232 NAME
233 rem_sec_grp_attr_val
234 DESCRIPTION
235 remove a specific section group attribute value from the list of values
236 of an existing section group attribute. This API cannot be called to
237 remove the last value in the list of values of a section group attribute.
238 To remove the last value, call unset_sec_grp_attr. Note that both the
239 section group attribute name and the specific section group attribute
240 value to be removed must be specified as arguments.
241
242 ARGUMENTS
243 group_name - section group name
244 attribute_name - section group attribute name
245 attribute_value - section group attribute value
246 NOTES
247
248 EXCEPTIONS
249
250 */
251 procedure rem_sec_grp_attr_val(group_name in varchar2,
252 attribute_name in varchar2,
253 attribute_value in varchar2);
254
255 /*----------------------- unset_sec_grp_attr ---------------------*/
256 /*
257 NAME
258 unset_sec_grp_attr
259 DESCRIPTION
260 remove a section group attribute (and its list of values)
261 ARGUMENTS
262 group_name - section group name
263 attribute_name - section group attribute name
264 NOTES
265
266 EXCEPTIONS
267
268 */
269
270 procedure unset_sec_grp_attr(group_name in varchar2,
271 attribute_name in varchar2);
272 PRAGMA SUPPLEMENTAL_LOG_DATA(unset_sec_grp_attr, AUTO);
273
274 /*-------------------- add_zone_section ---------------------------*/
275 /*
276 NAME
277 add_zone_section
278
279 DESCRIPTION
280 add a new section.
281
282 * tag is unique within a section group
283
284 * section names are not unique within a section group. this allows
285 defining multiple patterns for the same logical section, makeing the
286 details transparent to searches.
287
288 * no field and zone section name within a section group should be the same
289 ARGUMENTS
290 group_name - section group name, [user.]section_group_name
291 section_name - section name
292 tag - the pattern which marks the start of a section
293
294 NOTES
295
296 EXCEPTIONS
297
298 */
299 PROCEDURE add_zone_section(
300 group_name in varchar2,
301 section_name in varchar2,
302 tag in varchar2
303 );
304
305
306 /*-------------------- add_field_section -------------------------*/
307 /*
308 NAME
309 add_field_section
310
311 DESCRIPTION
312 add a new field section.
313
314 * tag is unique within a section group
315
316 * at most 16 unique field sections with a section group
317
318 * no field and zone section name within a section group should be the same
319 ARGUMENTS
320 group_name - section group name, [user.]section_group_name
321 section_name - section name
322 tag - the pattern which marks the start of a section
323
324 NOTES
325
326 EXCEPTIONS
327
328 */
329 PROCEDURE add_field_section(
330 group_name in varchar2,
331 section_name in varchar2,
332 tag in varchar2,
333 visible in boolean default FALSE
334 );
335
336 /*-------------------- add_special_section ---------------------------*/
337 /*
338 NAME
339 add_special_section
340
341 DESCRIPTION
342 add a special section to the group
343 special sections are not detected by tags. Instead, they are
344 detected automatically in the document text.
345
346 ARGUMENTS
347 group_name - section group name, [user.]section_group_name
348 section_name - the special section to add
349
350 NOTES
351 The following are valid special sections:
352
353 for all types:
354 SENTENCE
355 PARAGRAPH
356
357 EXCEPTIONS
358
359 */
360 PROCEDURE add_special_section(
361 group_name in varchar2
362 , section_name in varchar2
363 );
364
365 /*-------------------- add_stop_section -----------------------------*/
366 /*
367 NAME
368 add_stop_section
369
370 DESCRIPTION
371 add a stop section to the group
372 stop sections can be added only to the auto sectioner. They denote
373 those tags which should not be indexed.
374
375 ARGUMENTS
376 group_name - section group name, [user.]section_group_name
377 tag - the tag to stop
378
379 NOTES
380
381 EXCEPTIONS
382
383 */
384 PROCEDURE add_stop_section(
385 group_name in varchar2
386 , tag in varchar2
387 );
388
389 /*-------------------- add_attr_section -----------------------------*/
390 /*
391 NAME
392 add_attr_section
393
394 DESCRIPTION
395 add an attribute section to the group
396 attr sections can be added only to the xml sectioner.
397 They denote attributes whose text should be indexed
398
399 ARGUMENTS
400 group_name - section group name, [user.]section_group_name
401 section_name - section name
402 tag - the tag to index -- MUST be in form TAG@ATTR
403
404 NOTES
405
406 EXCEPTIONS
407
408 */
409 PROCEDURE add_attr_section(
410 group_name in varchar2
411 , section_name in varchar2
412 , tag in varchar2
413 );
414
415 /*-------------------- add_mdata_section -------------------------*/
416 /*
417 NAME
418 add_mdata_section
419
420 DESCRIPTION
421 add a new mdata section.
422
423 * tag is unique within a section group
424
425 * at most 99 unique mdata sections with a section group
426
427 * no section name unique within a section group
428
429 ARGUMENTS
430 group_name - section group name, [user.]section_group_name
431 section_name - section name
432 tag - the pattern which marks the start of a section
433 read_only - TRUE if calling remove_mdata() for this particlar
434 mdata section is allowed. The trade-off here is that
435 query will run a bit faster if this is set to FALSE.
436
437 NOTES
438
439 EXCEPTIONS
440
441 */
442 PROCEDURE add_mdata_section(
443 group_name in varchar2,
444 section_name in varchar2,
445 tag in varchar2,
446 read_only in boolean default FALSE
447 );
448
449 /*-------------------- add_ndata_section -------------------------*/
450 /*
451 NAME
452 add_ndata_section
453
454 DESCRIPTION
455 add a new ndata section.
456
457 * tag is unique within a section group
458
459 * at most 99 unique ndata sections with a section group
460
461 * no section name unique within a section group
462
463 ARGUMENTS
464 group_name - section group name, [user.]section_group_name
465 section_name - section name
466 tag - the pattern which marks the start of a section
467
468 NOTES
469
470 EXCEPTIONS
471
472 */
473 PROCEDURE add_ndata_section(
477 );
474 group_name in varchar2,
475 section_name in varchar2,
476 tag in varchar2
478
479 /*-------------------- add_mvdata_section -------------------------*/
480 /*
481 NAME
482 add_mvdata_section
483
484 DESCRIPTION
485 add a new mvdata section.
486
487 * tag is unique within a section group
488
489 * at most 100 unique mvdata sections with a section group
490
491 * no section name unique within a section group
492
493 ARGUMENTS
494 group_name - section group name, [user.]section_group_name
495 section_name - section name
496 tag - the pattern which marks the start of a section
497 datatype - datatype of the section
498
499 NOTES
500
501 EXCEPTIONS
502
503 */
504 PROCEDURE add_mvdata_section(
505 group_name in varchar2,
506 section_name in varchar2,
507 tag in varchar2,
508 datatype in varchar2 default NULL
509 );
510
511 /*-------------------- add_sdata_section -------------------------*/
512 /*
513 NAME
514 add_sdata_section
515
516 DESCRIPTION
517 add a new sdata section.
518
519 * tag is unique within a section group
520
521 * at most 99 unique sdata sections with a section group
522
523 * no section name unique within a section group
524
525 ARGUMENTS
526 group_name - section group name, [user.]section_group_name
527 section_name - section name
528 tag - the pattern which marks the start of a section
529 datatype - datatype of the section
530
531 NOTES
532
533 EXCEPTIONS
534
535 */
536 PROCEDURE add_sdata_section(
537 group_name in varchar2,
538 section_name in varchar2,
539 tag in varchar2,
540 datatype in varchar2 default NULL
541 );
542
543 /*-------------------- add_sdata_column -------------------------*/
544 /*
545 NAME
546 add_sdata_column
547
548 DESCRIPTION
549 map the specified FILTER BY or ORDER BY column name to an SDATA
550 section
551
552 ARGUMENTS
553 group_name - section group name, [user.]section_group_name
554 section_name - SDATA section name
555 column_name - column name.
556
557 NOTES
558
559 EXCEPTIONS
560
561 */
562 PROCEDURE add_sdata_column(
563 group_name in varchar2,
564 section_name in varchar2,
565 column_name in varchar2
566 );
567
568 /*-------------------- update_sdata -----------------------------*/
569 /*
570 NAME
571 update_sdata
572
573 DESCRIPTION
574 update sdata section value
575
576 ARGUMENTS
577 idx_name - index name
578 section_name - SDATA section name
579 sdata_value - sdata value
580 sdata_rowid - rowid
581 part_name - partition name
582
583 NOTES
584
585 EXCEPTIONS
586 */
587 PROCEDURE update_sdata(
588 idx_name in varchar2,
589 section_name in varchar2,
590 sdata_value in sys.anydata,
591 sdata_rowid in rowid,
592 part_name in varchar2 default NULL
593 );
594
595 /*-------------------- update_mvdata_set -----------------------------*/
596 /*
597 NAME
598 update_mvdata_set
599
600 DESCRIPTION
601 update mvdata section values as a set at document level
602
603 ARGUMENTS
604 idx_name - index name
605 section_name - MVDATA section name
606 mvdata_values - mvdata values
607 mvdata_rowids - rowids to be updated
608 part_name - partition name
609
610 NOTES
611
612 EXCEPTIONS
613 */
614 PROCEDURE update_mvdata_set(
615 idx_name in varchar2 default NULL,
616 section_name in varchar2 default NULL,
617 mvdata_values in sys.odcinumberlist,
618 mvdata_rowids in sys.odciridlist,
619 part_name in varchar2 default NULL
620 );
621
622 /*-------------------- insert_mvdata_values -----------------------------*/
623 /*
624 NAME
625 insert_mvdata_values
626
627 DESCRIPTION
628 insert mvdata section values in a list of documents
629
630 ARGUMENTS
631 idx_name - index name
632 section_name - MVDATA section name
633 mvdata_value - mvdata values
634 mvdata_rowid - rowids to be updated
635 part_name - partition name
636
637 NOTES
638
639 EXCEPTIONS
640 */
641 PROCEDURE insert_mvdata_values(
642 idx_name in varchar2 default NULL,
643 section_name in varchar2 default NULL,
644 mvdata_values in sys.odcinumberlist,
645 mvdata_rowids in sys.odciridlist,
646 part_name in varchar2 default NULL
647 );
648
652 delete_mvdata_values
649 /*-------------------- delete_mvdata_values -----------------------------*/
650 /*
651 NAME
653
654 DESCRIPTION
655 delete mvdata section values
656
657 ARGUMENTS
658 idx_name - index name
659 section_name - MVDATA section name
660 mvdata_values - mvdata values
661 mvdata_rowids - rowid to be updated
662 part_name - partition name
663
664 NOTES
665
666 EXCEPTIONS
667 */
668 PROCEDURE delete_mvdata_values(
669 idx_name in varchar2 default NULL,
670 section_name in varchar2 default NULL,
671 mvdata_values in sys.odcinumberlist,
672 mvdata_rowids in sys.odciridlist,
673 part_name in varchar2 default NULL
674 );
675
676
677 /*-------------------- add_mdata_column -------------------------*/
678 /*
679 NAME
680 add_mdata_column
681
682 DESCRIPTION
683 map the specified FILTER BY or ORDER BY column name to an MDATA
684 section
685
686 ARGUMENTS
687 group_name - section group name, [user.]section_group_name
688 section_name - MDATA section name
689 column_name - column name.
690
691 NOTES
692
693 EXCEPTIONS
694
695 */
696 PROCEDURE add_mdata_column(
697 group_name in varchar2,
698 section_name in varchar2,
699 column_name in varchar2
700 );
701
702 /*-------------------- remove_section ---------------------------*/
703 /*
704 NAME
705 remove_section
706
707 DESCRIPTION
708 remove section/s from a section group.
709
710 * delete all sections with sec_name in section group 'grp_name'.
711
712 * Only CTXAPP and CTXADMIN can drop a section, moreover, they can
713 only drop their own sections.
714
715 ARGUMENTS
716 group_name - section group name, [user.]section_group_name
717 section_name - section name , [user.]section_name
718
719 NOTES
720
721 EXCEPTIONS
722
723 */
724 PROCEDURE remove_section(
725 group_name in varchar2,
726 section_name in varchar2
727 );
728
729 /*-------------------- remove_section ---------------------------*/
730 /*
731 NAME
732 remove_section
733
734 DESCRIPTION
735 remove a section from a section group.
736
737 * Only CTXAPP and CTXADMIN can drop a section, moreover, they can
738 only drop their own sections.
739
740 ARGUMENTS
741 group_name - section group name, [user.]section_group_name
742 section_id - section id, [user.]section_name
743
744 NOTES
745
746 EXCEPTIONS
747
748 */
749 PROCEDURE remove_section(
750 group_name in varchar2,
751 section_id in number
752 );
753
754
755 /*-------------------- create_stoplist --------------------------*/
756 /*
757 NAME
758 create_stoplist
759
760 DESCRIPTION
761 create a new stoplist
762
763 ARGUMENTS
764 stoplist_name - name of the stoplist
765 stoplist_type - type of stoplist
766
767 NOTES
768
769 EXCEPTIONS
770
771 */
772 PROCEDURE create_stoplist(
773 stoplist_name in varchar2,
774 stoplist_type in varchar2 default 'BASIC_STOPLIST'
775 );
776 PRAGMA SUPPLEMENTAL_LOG_DATA(create_stoplist, AUTO);
777
778 /*-------------------- drop_stoplist --------------------------*/
779 /*
780 NAME
781 drop_stoplist
782
783 DESCRIPTION
784 delete a stoplist
785
786 ARGUMENTS
787 stoplist_name - name of the stoplist
788
789 NOTES
790
791 EXCEPTIONS
792
793 */
794 PROCEDURE drop_stoplist(
795 stoplist_name in varchar2
796 );
797
798 /*-------------------- add_stopword --------------------------*/
799 /*
800 NAME
801 add_stopword
802
803 DESCRIPTION
804 add a stopword to a stoplist
805
806 ARGUMENTS
807 stoplist_name - name of the stoplist
808 stopword - stopword to be added
809 language - language of the stopword (for MULTI_STOPLIST only)
810 language_dependent - language or user defined symbol
811
812 NOTES
813
814 EXCEPTIONS
815
816 */
817 PROCEDURE add_stopword(
818 stoplist_name in varchar2,
819 stopword in varchar2,
820 language in varchar2 default NULL,
821 language_dependent in boolean default TRUE
822 );
823
824 /*-------------------- add_stoptheme --------------------------*/
825 /*
826 NAME
827 add_stoptheme
828
829 DESCRIPTION
830 add a stoptheme to a stoplist
831
832 ARGUMENTS
833 stoplist_name - name of the stoplist
834 stoptheme - stoptheme to be added
835
839
836 NOTES
837
838 EXCEPTIONS
840 */
841 PROCEDURE add_stoptheme(
842 stoplist_name in varchar2,
843 stoptheme in varchar2
844 );
845
846 /*-------------------- add_stopclass --------------------------*/
847 /*
848 NAME
849 add_stopclass
850
851 DESCRIPTION
852 add a stopclass to a stoplist
853
854 ARGUMENTS
855 stoplist_name - name of the stoplist
856 stopclass - stopclass to be added
857
858 NOTES
859 currently only the stopclass NUMBERS is supported
860
861 */
862 PROCEDURE add_stopclass(
863 stoplist_name in varchar2,
864 stopclass in varchar2,
865 stoppattern in varchar2 default NULL
866 );
867
868 /*-------------------- remove_stopword --------------------------*/
869 /*
870 NAME
871 remove_stopword
872
873 DESCRIPTION
874 remove a stopword from a stoplist
875
876 ARGUMENTS
877 stoplist_name - name of the stoplist
878 stopword - stopword to be removed
879 language - language of the stopword (for MULTI_STOPLIST only)
880
881 NOTES
882
883 EXCEPTIONS
884
885 */
886 PROCEDURE remove_stopword(
887 stoplist_name in varchar2,
888 stopword in varchar2,
889 language in varchar2 default NULL
890 );
891 PRAGMA SUPPLEMENTAL_LOG_DATA(remove_stopword, AUTO);
892
893 /*-------------------- remove_stoptheme --------------------------*/
894 /*
895 NAME
896 remove_stoptheme
897
898 DESCRIPTION
899 remove a stoptheme from a stoplist
900
901 ARGUMENTS
902 stoplist_name - name of the stoplist
903 stoptheme - stoptheme to be removed
904
905 NOTES
906
907 EXCEPTIONS
908
909 */
910 PROCEDURE remove_stoptheme(
911 stoplist_name in varchar2,
912 stoptheme in varchar2
913 );
914 PRAGMA SUPPLEMENTAL_LOG_DATA(remove_stoptheme, AUTO);
915
916 /*-------------------- remove_stopclass --------------------------*/
917 /*
918 NAME
919 remove_stopclass
920
921 DESCRIPTION
922 remove a stopclass from a stoplist
923
924 ARGUMENTS
925 stoplist_name - name of the stoplist
926 stopclass - stopclass to be removed
927
928 NOTES
929
930 EXCEPTIONS
931
932 */
933 PROCEDURE remove_stopclass(
934 stoplist_name in varchar2,
935 stopclass in varchar2
936 );
937 PRAGMA SUPPLEMENTAL_LOG_DATA(remove_stopclass, AUTO);
938
939 /*-------------------- add_sub_lexer ---------------------------*/
940 /*
941 NAME
942 add_sub_lexer
943
944 DESCRIPTION
945 add a sub lexer to a multi-lexer preference
946
947 ARGUMENTS
948 lexer_name - name of the multi-lingual lexer preference
949 language - language of the sub-lexer
950 sub_lexer - name of the sub-lexer preference for this language
951 alt_value - alternate value for the language
952 language_dependent - language or user defined symbol
953
954 NOTES
955
956 EXCEPTIONS
957
958 */
959 PROCEDURE add_sub_lexer(
960 lexer_name in varchar2,
961 language in varchar2,
962 sub_lexer in varchar2,
963 alt_value in varchar2 default null,
964 language_dependent in boolean default TRUE
965
966 );
967
968 /*-------------------- remove_sub_lexer ---------------------------*/
969 /*
970 NAME
971 remove_sub_lexer
972
973 DESCRIPTION
974 remove a sub lexer from a multi-lexer preference
975
976 ARGUMENTS
977 lexer_name - name of the multi-lingual lexer preference
978 language - language of the sub-lexer
979
980 NOTES
981
982 EXCEPTIONS
983
984 */
985 PROCEDURE remove_sub_lexer(
986 lexer_name in varchar2,
987 language in varchar2
988 );
989
990 /*-------------------- update_sub_lexer ---------------------------*/
991 /*
992 NAME
993 update_sub_lexer
994
995 DESCRIPTION
996 update a sub lexer in a multi-lexer preference
997
998 ARGUMENTS
999 lexer_name - name of the multi-lingual lexer preference
1000 language - language of the sub-lexer
1001 sub_lexer - name of the sub-lexer preference for this language
1002
1003 NOTES
1004
1005 EXCEPTIONS
1006
1007 */
1008 PROCEDURE update_sub_lexer(
1009 lexer_name in varchar2,
1010 language in varchar2,
1011 sub_lexer in varchar2
1015 /*
1012 );
1013
1014 /*-------------------- sync_index --------------------------*/
1016 NAME
1017 sync_index
1018
1019 DESCRIPTION
1020 sync index
1021
1022 ARGUMENTS
1023 idx_name - index name
1024 memory - index memory
1025 part_name - index partition name
1026 parallel_degree - parallel degree
1027 direct_path - direct path loading
1028
1029 NOTES
1030
1031 EXCEPTIONS
1032
1033 */
1034 PROCEDURE sync_index(
1035 idx_name in varchar2 default NULL,
1036 memory in varchar2 default NULL,
1037 part_name in varchar2 default NULL,
1038 parallel_degree in number default 1,
1039 maxtime in number default NULL,
1040 locking in number default LOCK_WAIT,
1041 direct_path in boolean default false
1042 );
1043
1044 /*-------------------- optimize_index --------------------------*/
1045 /*
1046 NAME
1047 optimize_index
1048
1049 DESCRIPTION
1050 optimize index
1051
1052 ARGUMENTS
1053 idx_name - index name
1054 optlevel - optimization level -- FAST or FULL
1055 maxtime - max optimization time, in minutes, for FULL optimize
1056 token - text token string to optimize, for TOKEN optimize
1057 note token types 1, 2, 5, 7, and 8 are case-sensitive.
1058 part_name - index partition name
1059 token_type - for TOKEN optimize only, the type of the token to optimize
1060 (default value: 0). For name to type resolution, see
1061 ctx_report.token_type
1062 parallel_degree - the degree of parallelism for this optimize.
1063 NOTE: parallel optimize is supported ONLY for FULL
1064 optimize, on CONTEXT indexes. Any other conditions
1065 will produce an error message.
1066 background - slow down in presence of sync_index or query
1067 NOTES
1068
1069 EXCEPTIONS
1070
1071 */
1072 PROCEDURE optimize_index(
1073 idx_name in varchar2,
1074 optlevel in varchar2,
1075 maxtime in number default null,
1076 token in varchar2 default null,
1077 part_name in varchar2 default null,
1078 token_type in number default null,
1079 parallel_degree in number default 1,
1080 memory in varchar2 default null,
1081 background in boolean default FALSE
1082 );
1083
1084 /*-------------------- split_dollari --------------------------*/
1085 /*
1086 NAME
1087 split_dollari
1088
1089 DESCRIPTION
1090 split the $I table
1091
1092 ARGUMENTS
1093 idx_name - index name
1094 part_name - index partition name
1095 mapping_tab - the name of the table that contains the mapping of rowids to
1096 partition name that will contain the document from that row
1097 name_prefix - the prefix used for naming the output $I tables. The name
1098 will be concatenation of name_prefix, '_', and part_name
1099 if the part_name='NULL', the name_prefix will be the name
1100 of the output table.
1101 NOTES
1102
1103 EXCEPTIONS
1104
1105 */
1106 PROCEDURE split_dollari(
1107 idx_name in varchar2,
1108 part_name in varchar2,
1109 mapping_tab in varchar2,
1110 name_prefix in varchar2,
1111 tspace in varchar2 default null
1112 );
1113 PRAGMA SUPPLEMENTAL_LOG_DATA(split_dollari, AUTO);
1114
1115 /*-------------------- create_index_set ---------------------------*/
1116 /*
1117 NAME
1118 create_index_set
1119
1120 DESCRIPTION
1121 create a new index set.
1122
1123 * index set name is unique within an owner.
1124 * Only CTXAPP users and CTXSYS can create an index set.
1125
1126 ARGUMENTS
1127 set_name - index set name. user.name syntax allowed.
1128
1129 NOTES
1130
1131 EXCEPTIONS
1132
1133 */
1134 PROCEDURE create_index_set(
1135 set_name in varchar2
1136 );
1137
1138 /*------------------------------ add_index ---------------------------------*/
1139 /*
1140 NAME
1141 add_index
1142
1143 DESCRIPTION
1144 add a new index to an index set.
1145
1146 * column list is unique within an index set
1147
1148 * at most 100 indexes in an index set
1149
1150 ARGUMENTS
1151 set_name - index set name
1152 column_list - column list for the index
1153 storage_clause - index storage clause
1154
1155 NOTES
1156
1157 EXCEPTIONS
1158
1159 */
1160 PROCEDURE add_index(
1161 set_name in varchar2,
1162 column_list in varchar2,
1163 storage_clause in varchar2 default null
1164 );
1165
1166 /*-------------------- remove_index ---------------------------*/
1167 /*
1168 NAME
1169 remove_index
1170
1171 DESCRIPTION
1172 remove index with the specified column list from an index set.
1173
1174 ARGUMENTS
1175 set_name - index set name
1176 column_list - index column list
1180 EXCEPTIONS
1177
1178 NOTES
1179
1181
1182 */
1183 PROCEDURE remove_index(
1184 set_name in varchar2,
1185 column_list in varchar2
1186 );
1187
1188 /*-------------------- drop_index_set ---------------------------*/
1189 /*
1190 NAME
1191 drop_index_set
1192
1193 DESCRIPTION
1194 drop an index set.
1195
1196 ARGUMENTS
1197 set_name - index set name
1198
1199 NOTES
1200
1201 EXCEPTIONS
1202
1203 */
1204 PROCEDURE drop_index_set(
1205 set_name in varchar2
1206 );
1207
1208 /*-------------------- create_policy ---------------------------*/
1209 /*
1210 NAME
1211 create_policy
1212
1213 DESCRIPTION
1214 create a policy.
1215
1216 ARGUMENTS
1217 policy_name - the name for the new policy
1218 filter - the filter preference to use
1219 section_group - the section group to use
1220 lexer - the lexer preference to use
1221 stoplist - the stoplist preference to use
1222 wordlist - the wordlist preference to use
1223
1224 NOTES
1225
1226 EXCEPTIONS
1227
1228 */
1229 PROCEDURE create_policy(
1230 policy_name in varchar2,
1231 filter in varchar2 default NULL,
1232 section_group in varchar2 default NULL,
1233 lexer in varchar2 default NULL,
1234 stoplist in varchar2 default NULL,
1235 wordlist in varchar2 default NULL
1236 );
1237 PRAGMA SUPPLEMENTAL_LOG_DATA(create_policy, AUTO);
1238
1239 /*-------------------- update_policy ---------------------------*/
1240 /*
1241 NAME
1242 update_policy
1243
1244 DESCRIPTION
1245 update a policy. Replaces the preferences of the policy.
1246 arguments left null will not be replaced.
1247
1248 ARGUMENTS
1249 policy_name - the name for the policy
1250 filter - the new filter preference to use
1251 section_group - the new section group to use
1252 lexer - the new lexer preference to use
1253 stoplist - the new stoplist preference to use
1254 wordlist - the new wordlist preference to use
1255
1256 NOTES
1257
1258 EXCEPTIONS
1259
1260 */
1261 PROCEDURE update_policy(
1262 policy_name in varchar2,
1263 filter in varchar2 default NULL,
1264 section_group in varchar2 default NULL,
1265 lexer in varchar2 default NULL,
1266 stoplist in varchar2 default NULL,
1267 wordlist in varchar2 default NULL
1268 );
1269 PRAGMA SUPPLEMENTAL_LOG_DATA(update_policy, AUTO);
1270
1271 /*-------------------- copy_policy ---------------------------*/
1272 /*
1273 NAME
1274 copy_policy
1275
1276 DESCRIPTION
1277 create a policy which is a metadata copy of an existing policy
1278 or index.
1279
1280 ARGUMENTS
1281 source_policy - the source policy
1282 policy_name - the new policy
1283
1284 NOTES
1285 currently the owner of the old and new policies must be the same
1286 */
1287 PROCEDURE copy_policy(
1288 source_policy in varchar2,
1289 policy_name in varchar2
1290 );
1291 PRAGMA SUPPLEMENTAL_LOG_DATA(copy_policy, AUTO);
1292
1293 /*-------------------- drop_policy ---------------------------*/
1294 /*
1295 NAME
1296 drop_policy
1297
1298 DESCRIPTION
1299 drop a policy.
1300
1301 ARGUMENTS
1302 policy_name - the name of the policy
1303
1304 NOTES
1305
1306 EXCEPTIONS
1307
1308 */
1309 PROCEDURE drop_policy(
1310 policy_name in varchar2
1311 );
1312 PRAGMA SUPPLEMENTAL_LOG_DATA(drop_policy, AUTO);
1313
1314 /*-------------------- add_mdata ---------------------------*/
1315 /*
1316 NAME
1317 add_mdata
1318
1319 DESCRIPTION
1320 add mdata values to existing documents
1321 */
1322 PROCEDURE add_mdata(
1323 idx_name in varchar2,
1324 section_name in varchar2,
1325 mdata_value in varchar2,
1326 mdata_rowid in rowid,
1327 part_name in varchar2 default null
1328 );
1329 PROCEDURE add_mdata(
1330 idx_name in varchar2,
1331 section_name in varchar2,
1332 mdata_values in sys.odcivarchar2list,
1333 mdata_rowids in sys.odciridlist,
1334 part_name in varchar2 default null
1335 );
1336
1337 /*-------------------- remove_mdata ---------------------------*/
1338 /*
1339 NAME
1340 remove_mdata
1341
1342 DESCRIPTION
1343 remove mdata values from existing documents
1344 */
1345 PROCEDURE remove_mdata(
1346 idx_name in varchar2,
1347 section_name in varchar2,
1348 mdata_value in varchar2,
1349 mdata_rowid in rowid,
1350 part_name in varchar2 default null
1351 );
1352 PROCEDURE remove_mdata(
1353 idx_name in varchar2,
1354 section_name in varchar2,
1355 mdata_values in sys.odcivarchar2list,
1356 mdata_rowids in sys.odciridlist,
1357 part_name in varchar2 default null
1358 );
1359
1363 );
1360 PROCEDURE replace_index_metadata(
1361 idx_name in varchar2,
1362 parameter_string in varchar2
1364 PRAGMA SUPPLEMENTAL_LOG_DATA(replace_index_metadata, AUTO);
1365
1366 /*-------------------- populate_pending ---------------------------*/
1367 /*
1368 NAME
1369 populate_pending
1370
1371 DESCRIPTION
1372 loads the DML pending queue with all base table rowids
1373 intended to be used after a create index ... NOPOPULATE
1377 part_name in varchar2 default null
1374 */
1375 PROCEDURE populate_pending(
1376 idx_name in varchar2,
1378 );
1379
1380 PROCEDURE recreate_index_online(
1381 idx_name in varchar2,
1382 parameter_string in varchar2 default null,
1383 parallel_degree in number default 1,
1384 partition_name in varchar2 default null
1385 );
1386
1387 PROCEDURE create_shadow_index(
1388 idx_name in varchar2,
1389 parameter_string in varchar2 default null,
1390 parallel_degree in number default 1
1391 );
1392
1393 PROCEDURE exchange_shadow_index(
1394 idx_name in varchar2,
1395 partition_name in varchar2 default null
1396 );
1397
1398 procedure drop_shadow_index(
1399 idx_name varchar2
1400 );
1401
1402 /*-------------------- split_zone_tokens ---------------------------*/
1403 /*
1404 NAME
1405 split_zone_tokens
1406
1407 DESCRIPTION
1408 To move contents of a zone section to one or more zone sections
1409 */
1410
1411 PROCEDURE split_zone_tokens(
1412 idx_name in varchar2,
1413 part_name in varchar2 default null,
1414 source_section in varchar2,
1415 split_map in split_tab
1416 );
1417
1418 /*-------------------- zone_to_field ---------------------------*/
1419 /*
1420 NAME
1421 zone_to_field
1422
1423 DESCRIPTION
1424 Migrate from zone to field sections
1425 */
1426
1427 PROCEDURE zone_to_field(
1428 idx_name in varchar2,
1429 part_name in varchar2 default null,
1430 lex_pref in varchar2,
1431 storage_pref in varchar2,
1432 attr_val_tab in varchar2,
1433 zone_sec_list in sec_tab,
1434 fld_sec_list in sec_tab,
1435 memory in varchar2 default '500M'
1436 );
1437 /* non scalar dt */
1438
1439 /*--------------------------- add_auto_optimize -------------------*/
1440 procedure add_auto_optimize(
1441 idx_name in varchar2,
1442 part_name in varchar2 default null,
1443 optlevel in varchar2 default ctx_ddl.optlevel_merge
1444 );
1445 PRAGMA SUPPLEMENTAL_LOG_DATA(add_auto_optimize, AUTO);
1446
1447 /*--------------------------- remove_auto_optimize -------------------*/
1448 procedure remove_auto_optimize(
1449 idx_name in varchar2,
1450 part_name in varchar2 default null
1451 );
1452 PRAGMA SUPPLEMENTAL_LOG_DATA(remove_auto_optimize, AUTO);
1453
1454 /*-------------------------- alter_index ---------------------------------*/
1455 procedure alter_index(
1456 idx_name in varchar2,
1457 parameters in varchar2
1458 );
1459 PRAGMA SUPPLEMENTAL_LOG_DATA(alter_index, AUTO);
1460
1461 PROCEDURE add_sdata(
1462 idx_name in varchar2,
1463 section_name in varchar2,
1464 sdata_value in varchar2,
1465 sdata_rowid in rowid,
1466 part_name in varchar2 default null
1467 );
1468
1469 PROCEDURE remove_sdata(
1470 idx_name in varchar2,
1471 section_name in varchar2,
1472 sdata_value in varchar2,
1473 sdata_rowid in rowid,
1474 part_name in varchar2 default null
1475 );
1476
1477 /*--------------------------- repopulate_dollarn ---------------------------*/
1478 /* repopulate_dollarn - repopulate $N as opposite of $K */
1479 PROCEDURE repopulate_dollarn(
1480 idx_name in varchar2,
1481 part_name in varchar2 default null
1482 );
1483
1484 /*----------------------- remove_overlap_dollars ---------------------------*/
1485 PROCEDURE remove_overlap_dollars(
1486 idx_name in varchar2,
1487 part_name in varchar2 default null
1488 );
1489
1490 END ctx_ddl;