@@ -3,8 +3,9 @@ CREATE INDEX <index-name>
33ON  < table- name>  (< column- name> )
44INDEXTYPE IS CTXSYS .CONTEXT 
55PARAMETERS (' DATASTORE <datastore-name>
6-              STOPLIST <stoplist-name> 
7-              WORDLIST <wordlist-name>'  )
6+              WORDLIST <wordlist-name> 
7+              LEXER <lexer-name> 
8+              STOPLIST <stoplist-name>'  )
89
910--  Synchronize index contents
1011exec CTX_DDL .SYNC_INDEX (:index_name);
@@ -14,19 +15,35 @@ exec CTX_DDL.OPTIMIZE_INDEX(:index_name, 'REBUILD');
1415alter  index  < index- name>  rebuild;
1516
1617--  Parameters
18+ --  Datastore — indexing more than one column or function
19+ --  Stoplist — list of tokens to ignore
20+ --  Wordlist — weird preferences (fuzzy search, substring indexing, etc)
21+ --  Lexer - token preferences (printjoins, etc)
22+ BEGIN 
23+   CTX_DDL .CREATE_PREFERENCE (:wordlist_name, ' BASIC_WORDLIST'  );
24+   CTX_DDL .SET_ATTRIBUTE (:wordlist_name, ' SUBSTRING_INDEX'  , ' YES'  );
25+ END;
26+ / 
27+ 
28+ BEGIN 
29+   CTX_DDL .CREATE_PREFERENCE (:lexer_name, ' BASIC_LEXER'  );
30+   --  do not 'tokenize' by '/'
31+   CTX_DDL .SET_ATTRIBUTE (:lexer_name, ' PRINTJOINS'  , ' /'  );
32+ END;
33+ / 
1734
1835--  Commands for creating and dropping stoplists
1936BEGIN 
2037  CTX_DDL .CREATE_STOPLIST (
2138    stoplist_name =>  :stoplist_name,
2239    stoplist_type =>  ' BASIC_STOPLIST'  );
2340END;
24- 
41+ / 
2542BEGIN 
2643  CTX_DDL .DROP_STOPLIST (
2744    stoplist_name =>  :stoplist_name);
2845END;
29- 
46+ / 
3047--  Create and index without a stoplist first.
3148--  Check the most common tokens in dr$<index-name>$i.
3249--  Add stopwords
3552    stoplist_name =>  :stoplist_name,
3653    stopword      =>  :token);
3754END;
38- 
55+ / 
3956--  If you want to check existing stopwords, query CTX_STOPWORDS
4057select  * 
4158from    CTX_STOPWORDS
0 commit comments