How to stop the data date of getting indexed in the document type?

Hi all

I have a document where the date is used frequently, how to stop these dates back to get indexed?

is it not possible to add dates in the stop class?

Please let me know your suggestions

Thanks in advance.

The only available stopclass is currently numbers. However, in a text document, the dates are just numbers and characters. So, if you are using the numbers stopclass, which eliminates the part numbers of all dates. You can also add all the months, each abbreviation of the month, every day of the week and every abbreviation for all days of the week. I have demonstrated with just below. Of course, this will prevent also other numbers course tokenized so non-date.

SCOTT@orcl_11g> CREATE TABLE test_tab (test_col VARCHAR2 (40))
  2  /

Table created.

SCOTT@orcl_11g> INSERT ALL
  2  INTO test_tab VALUES ('Today is Friday, May 15, 2009.')
  3  INTO test_tab VALUES ('Today is Friday, 15/May/2009.')
  4  INTO test_tab VALUES ('Today is Friday, 15-May-2009.')
  5  INTO test_tab VALUES ('Today is Fri, 15-May-2009.')
  6  SELECT * FROM DUAL
  7  /

4 rows created.

SCOTT@orcl_11g> BEGIN
  2    CTX_DDL.CREATE_STOPLIST ('your_stoplist', 'BASIC_STOPLIST');
  3    CTX_DDL.ADD_STOPCLASS ('your_stoplist', 'NUMBERS');
  4    CTX_DDL.ADD_STOPWORD ('your_stoplist', 'MAY');
  5    CTX_DDL.ADD_STOPWORD ('your_stoplist', 'FRIDAY');
  6    CTX_DDL.ADD_STOPWORD ('your_stoplist', 'FRI');
  7  END;
  8  /

PL/SQL procedure successfully completed.

SCOTT@orcl_11g> CREATE INDEX test_idx ON test_tab (test_col)
  2  INDEXTYPE IS CTXSYS.CONTEXT
  3  PARAMETERS ('STOPLIST your_stoplist')
  4  /

Index created.

SCOTT@orcl_11g> SELECT token_text FROM dr$test_idx$i
  2  /

TOKEN_TEXT
----------------------------------------------------------------
IS
TODAY

SCOTT@orcl_11g> 

Tags: Database

Similar Questions

Maybe you are looking for