Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL Language Quick Reference
Something that grew out of a desire to play with Oracle Text, I created
context indexes in Oracle which have indexed all the Oracle 8i, 9i, 10g pdfs
and a host of whitepapers as well and searching across all Oracle
documentation is as simple as running a basic query!! The results are
returned immediately and ranked according to the number of references found.
Very helpful when you know what you're looking for but not sure which doc it's in.
All that's required is
Install Oracle Text schema
CREATE DIRECTORY orapdf AS '<path to docs>';
BEGIN
ctx_ddl.create_preference('ORAPDF','FILE_DATASTORE');
ctx_ddl.set_attribute('ORAPDF','PATH','');
END;
/
drop table orapdf;
create table orapdf (docid number, pdf varchar2(255));
insert into orapdf values (1,'/docs/oracle/9.2.1/concepts.pdf'); insert into orapdf values (2,'/docs/oracle/9.2.1/admin_guide.pdf'); insert into orapdf values (3,'/docs/oracle/9.2.1/admin_guide_unix.pdf'); insert into orapdf values (4,'/docs/oracle/9.2.1/admin_guide_win32.pdf');...
create index orapdf_idx01 on orapdf (pdf)
indextype is ctxsys.context
parameters ('datastore ctxsys.file_datastore filter ctxsys.inso_filter')
/
and then a simple query like:
column document format a100
column version format a12
select
score(1) rank,
substr(pdf,instr(pdf,'/',1,3)+1,instr(pdf,'/',1,4)-instr(pdf,'/',1,3)-1)
version,
'acroread' reader,
pdf document
from gfarmer.orapdf
where contains(pdf,'&&1',1) > 0
order by score(1) desc
/
output is like:
sys_at_gfprd> @orasrch 'pctfree'
RANK VERSION READER DOCUMENT
---------- ------------ -------- ---------------------------------------------------------------------------- ------------------------ 100 9.2.0 acroread /docs/oracle/9.2.0/olap_users_guide.pdf 100 9.2.0 acroread /docs/oracle/9.2.0/error_messages.pdf 100 9.2.0 acroread /docs/oracle/9.2.0/concepts.pdf...
Then I cut and paste the reader and document and then perform a search in the document.
Adding new docs is as simple as an insert into the tables and resync of the index:
BEGIN ctx_ddl.sync_index('GFARMER.ORAPDF_IDX01'); END;
/
Indexing is very CPU intensive and can take some time, but it pays off pretty quickly!!
Cheers,
Graeme.
-----Original Message-----
From: Michael Thomas [mailto:mhthomas_at_yahoo.com]
Sent: Tuesday, 15 June 2004 1:59 AM
To: oracle-l_at_freelists.org
Subject: RE: SQL Language Quick Reference
Hi,
I've found a combination that makes reading docs (e.g. pdf) a pleasure on my laptop.
When I know what I'm searching for and select the correct pdf, then its better than flipping pages. But, if I'm generally lost then the html search of Oracle documentation is the fastest way to get good doc details for a specific Oracle version.
HTH. Regards,
Mike Thomas
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html ----------------------------------------------------------------- -- This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please notify the sender and delete the transmission. The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Limited unless expressly stated otherwise. ---------------------------------------------------------------- Please see the official ORACLE-L FAQ: http://www.orafaq.com ---------------------------------------------------------------- To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line. -- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Mon Jun 14 2004 - 18:55:31 CDT