Home » Server Options » Text & interMedia » File Datastore and opening the file
File Datastore and opening the file [message #75888] Mon, 19 November 2001 00:24 Go to next message
Madhu
Messages: 36
Registered: April 2001
Member
Hi,
I have tried using both types of attributes to use the file data store preference. But I'm not able to open the files. Here is the code that I have used.....Please let me know what's wrong or what else I should include......

drop table datastores;

create table datastores(id number primary key, docs varchar2(2000));
insert into datastores values(111555,'1.txt');
insert into datastores values(111556,'2.txt');
commit;

begin
ctx_ddl.drop_preference('COMMON_DIR');
end;
/

begin
ctx_ddl.create_preference('COMMON_DIR','FILE_DATASTORE');
ctx_ddl.set_attribute('COMMON_DIR','PATH','D:/madhavi');
end;
/

create index datastores_text on datastores (docs)
indextype is ctxsys.context
parameters ('datastore COMMON_DIR');

select id,docs,score(1) from datastores
where contains (docs,
'{datastore}',1) > 0;

Here basically, I don't understand the '{datastore}' term....what does it contain.

output :-

ID
----------
DOCS
-------------------------
SCORE(1)
----------
111555
1.txt
4

why am I not able to get inside the file 1.txt? How do I search for a word inside the file?

I also tried giving a word in the select statement but then it says: "No rows selected".

Please enlighten me with a proper answer

Thanx,
Madhavi

----------------------------------------------------------------------
I have the same problem [message #75927 is a reply to message #75888] Wed, 13 March 2002 09:26 Go to previous messageGo to next message
Yam
Messages: 1
Registered: March 2002
Junior Member
If anybody can help me! I really apreciatte it...
I have presentation tomorrow! And it does not work!
Re: I have the same problem [message #75928 is a reply to message #75927] Wed, 13 March 2002 09:50 Go to previous message
sinan
Messages: 5
Registered: March 2002
Junior Member
Yore are searching some_word with your query

select id,docs,score(1) from datastores
where contains (docs,'some_word',1) > 0

and getting document_id which contains that word

it's as it should be
Previous Topic: Re: array(Urgent)
Next Topic: catsearch wildcard
Goto Forum:
  


Current Time: Fri Dec 26 06:19:38 CST 2014

Total time taken to generate the page: 0.07599 seconds