URL_DATASTORE Example
This example creates a URL_DATASTORE preference called URL_PREF for which the http_proxy, no_proxy, and timeout attributes are set. The defaults are used for the attributes that are not set.
begin
ctx_ddl.create_preference('URL_PREF','URL_DATASTORE');
ctx_ddl.set_attribute('URL_PREF','HTTP_PROXY','www-proxy.us.example.com');
ctx_ddl.set_attribute('URL_PREF','NO_PROXY','us.example.com');
ctx_ddl.set_attribute('URL_PREF','Timeout','300');
end;
Create the table and insert values into it:
create table urls(id number primary key, docs varchar2(2000));
insert into urls values(111555,'http://context.us.example.com');
insert into urls values(111556,'http://www.sun.com');
commit;
To create the index, specify URL_PREF as the datastore:
create index datastores_text on urls ( docs )
indextype is ctxsys.context
parameters ( 'Datastore URL_PREF' );