CREATE TABLE files (
  id NUMBER PRIMARY KEY,
  issue_id NUMBER,
  path VARCHAR(255) UNIQUE,
  ot_format VARCHAR(6)
);

create index file_index ON files(path) INDEXTYPE IS ctxsys.context  
       PARAMETERS ('datastore url_pref1');

INSERT INTO files VALUES (1, 2, 'http://www.cs.nmsu.edu/~tson/classes/fall07-482/DataMining/information_retrival/file1.txt', NULL);
INSERT INTO files VALUES (2, 2, 'http://www.cs.nmsu.edu/~tson/classes/fall07-482/DataMining/information_retrival/file2.txt', NULL);
INSERT INTO files VALUES (3, 2, 'http://www.cs.nmsu.edu/~tson/classes/fall07-482/DataMining/information_retrival/file3.txt', NULL);


/*

exec ctx_ddl.create_preference('url_pref1','URL_DATASTORE');

create index file_index ON files(path) INDEXTYPE IS ctxsys.context  
       PARAMETERS ('datastore url_pref1');



QL> SELECT id FROM files WHERE CONTAINS(path, 'information', 1) > 0;

        ID
----------
         1
         2

SQL> SELECT id FROM files WHERE CONTAINS(path, 'information AND clock',1)>0;

        ID
----------
         2

SQL> SELECT id FROM files WHERE CONTAINS(path, 'information AND retrieval',1)>0;

        ID
----------
         1
         2

SQL> SELECT id FROM files WHERE CONTAINS(path, 'Deepak',1)>0;

        ID
----------
         3

SELECT id FROM files WHERE CONTAINS(path, 'clock OR information', 1) > 0;
SELECT id FROM files WHERE CONTAINS(path, 'information', 1) > 0;

*/
