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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Problem with XMLType indexing XPATH?

Re: Problem with XMLType indexing XPATH?

From: Tim Arnold <timkarnold_at_comcast.net>
Date: Fri, 22 Apr 2005 09:10:10 -0400
Message-ID: <Y_mdnQ4YJ_nvavXfRVn-qQ@comcast.com>

"Ko van der Sloot" <Ko.vanderSloot_at_uvt.nl> wrote in message news:d45vgu$97j$1_at_troll.uvt.nl...
> Hello,
> i'm a rookie with Oracle, Oracle text en Oracle XMLtype, so my problem
> might wel be some misunderstanding, but anyway:
>
> Below you will find an script bug.sql which behaves very strange on my
> system:
> Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
> With the Partitioning, OLAP and Oracle Data Mining options
> JServer Release 9.2.0.4.0 - Production
>
> I thought that i could speep up searches with existsNode() after the
> command:
> create index my_x_idx on bug(data_char) indextype is ctxsys.CTXXPATH;
>
> as described in my Oracle 9i manual chapter 4, page 4-42
>
> But after this, i get wrong results:
> It seems that OR is not symetric anymore !?
>
> Is it my bug, probably, or an Oracle problem?
>
> clueless,
> Ko vd Sloot
>
> the script:
> =======================================================================
> drop table bug;
>
> create table bug ( doc_id NUMBER, data_char xmltype );
> insert into bug values( 1, XMLType(
> '<document>
> <ti>Test 1</ti>
> <au>Jan</au>
> <py>2002</py>
> </document>' ) );
>
> insert into bug values( 2, XMLType(
> '<document>
> <ti>Test 2</ti>
> <au>Pier</au>
> <py>2003</py>
> </document>' ) );
>
> insert into bug values( 3, XMLType(
> '<document>
> <ti>Test 3</ti>
> <au>Joris</au>
> <py>2003</py>
> </document>' ) );
>
> insert into bug values( 4, XMLType(
> '<document>
> <ti>Test 2 ander jaar</ti>
> <au>Corneel</au>
> <py>2002</py>
> </document>' ) );
>
> insert into bug values( 5, XMLType(
> '<document>
> <ti>Test 5</ti>
> <au>Bontekoe</au>
> <py>2003</py>
> </document>' ) );
>
> create index my_idx on bug(data_char) indextype is ctxsys.context;
>
> select count( doc_id ) from bug where
> existsNode(data_char,'//py[.>"2002"]') > 0 OR contains(data_char,'2
> inpath(//ti)' ) > 0;
> select count( doc_id ) from bug where contains(data_char,'2
> inpath(//ti)' ) > 0 OR existsNode(data_char,'//py[.>"2002"]') > 0;
>
> create index my_x_idx on bug(data_char) indextype is ctxsys.CTXXPATH;
>
> select count( doc_id ) from bug where
> existsNode(data_char,'//py[.>"2002"]') > 0 OR contains(data_char,'2
> inpath(//ti)' ) > 0;
> select count( doc_id ) from bug where contains(data_char,'2
> inpath(//ti)' ) > 0 OR existsNode(data_char,'//py[.>"2002"]') > 0;

I think that there a some bugs in XML implementation in 9.2.0.4 We upgraded to 9.2.0.5 Received on Fri Apr 22 2005 - 08:10:10 CDT

Original text of this message

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