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

Home -> Community -> Mailing Lists -> Oracle-L -> Oracle Text Boolean search

Oracle Text Boolean search

From: <geraldine_2_at_comcast.net>
Date: Tue, 21 Sep 2004 01:55:00 +0000
Message-Id: <092120040155.4762.414F89EA000F22200000129A2200762302CDA10A02070B040E9D0A09@comcast.net>


hi, can someone provide some insights how I can rewrite my boolean search query more efficiently?

I would like to do a search for something like "(a AND b) or (c AND d) or (e AND f)..."

The query I have formulated does not scale well when I have multiple AND's and OR's.

 select * from (

     (   select id, name from testtable tab1
         where tab1.type='HEADING'
         and contains (value, 'a')>1
         AND EXISTS
         (select id, name from testtable tab2
          where tab1.id=tab2.id
           and tab2.type='BODY'
           and  contains (value, 'b')>1
         )

)
UNION ( select id, name from testtable tab1 where tab1.type='BODY' and contains (value, 'c')>1 AND EXISTS (select id, name from testtable tab2 where tab1.id=tab2.id and tab2.type='SUBHEADING' and contains (value, 'd')>1 )
)
UNION ... ... and so on....

appreciate any help.

thanks.

geraldine

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Sep 20 2004 - 20:50:36 CDT

Original text of this message

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