I'm make a stored procedure that performs search functions. The procedure has the following parameters:

pi_search_text VARCHAR2 (text to search for)
pi_search_period NUMBER (0-4)

The table I am searching on looks like this

OMS_PARAGRAPHS
---------------------
ID NUMBER(12)
NAME VARCHAR(256)
TEXT (CLOB)
DATEUPDATED (DATE) default = SYSDATE

I have a an index called omsprgrphs_search_ctx_idx on dummy coulmn(NameTextIndex) with a multi column datastore as attribute that allows me to search on the name and text columns simultaneously. My problem is the the search period, the number 0-4 represents a time frame:

0 = get records updated in last 1 day
1 = get records updated in last 1 week
2 = get records updated in last 1 month
3 = get records updated in last 6 months
4 = get records updated in last 1 year

I'm not sure how to incorporate the search period into my sql statement.

Select op.id, op.name, op.text
From oms_paragraphs op
Where contains (op.NameTextIndex, pi_search_text, 1) > 0;

Any ideas?