Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: query intermedia index

Re: query intermedia index

From: Howard J. Rogers <howardjr2000_at_yahoo.com.au>
Date: Fri, 22 Nov 2002 09:10:58 +1100
Message-ID: <oJcD9.81368$g9.229190@newsfeeds.bigpond.com>


Yup. When you create an interMedia text index, 4 new tables are created with a 'dr$' stuck on the front of the name of the index and suffixes of $i, $k, $n and $r. You want the $i one.

As a 'for example':

SQL> connect scott/tiger
Connected.
SQL> create table imedia(
  2 id number,
  3 news varchar2(4000));
Table created.

SQL> alter table imedia add (constraint imedia_id_pk primary key (id)); Table altered.

SQL> insert into imedia values (1,'is it possible to query the index created for full-text fields?');
1 row created.
SQL> commit;
Commit complete.

SQL> create index news_idx on imedia(news) indextype is ctxsys.context; Index created.

SQL> select table_name from user_tables; TABLE_NAME



BONUS
DEPT
DR$NEWS_IDX$I
DR$NEWS_IDX$K
DR$NEWS_IDX$N
DR$NEWS_IDX$R

EMP
IMEDIA
SALGRADE
9 rows selected.

SQL> desc DR$NEWS_IDX$I

 Name                                      Null?    Type
 ----------------------------------------- -------- ------------------------

 TOKEN_TEXT                                NOT NULL VARCHAR2(64)
 TOKEN_TYPE                                NOT NULL NUMBER(3)
 TOKEN_FIRST                               NOT NULL NUMBER(10)
 TOKEN_LAST                                NOT NULL NUMBER(10)
 TOKEN_COUNT                               NOT NULL NUMBER(10)
 TOKEN_INFO                                         BLOB

SQL> set pagesize 2000
SQL> select TOKEN_TEXT,TOKEN_TYPE,TOKEN_FIRST,TOKEN_LAST,TOKEN_COUNT from DR$NEWS_IDX$I;

TOKEN_TEXT                                                       TOKEN_TYPE
---------------------------------------------------------------- ----------
TOKEN_FIRST TOKEN_LAST TOKEN_COUNT
----------- ---------- -----------
CREATED                                                                   0
          1          1           1

FIELDS                                                                    0
          1          1           1

FULL                                                                      0
          1          1           1

INDEX                                                                     0
          1          1           1

POSSIBLE                                                                  0
          1          1           1

QUERY                                                                     0
          1          1           1

TEXT                                                                      0
          1          1           1

7 rows selected.

Obviously, the only column you're really interested in is the TOKEN_TEXT one.

Regards
HJR "Jens Grivolla" <j-news2002-11_at_grivolla.de> wrote in message news:87smxuli65.fsf_at_msgid.grivolla.de...
> Hi,

>

> is it possible to query the index created for full-text fields? I
> would like to be able to get a sort of dictionary of words contained
> in certain documents.
>

> TIA, ciao,

>
> Jens
Received on Thu Nov 21 2002 - 16:10:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US