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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: OracleText: Search for exact string match

RE: OracleText: Search for exact string match

From: susan lam <susanzlam_at_yahoo.com>
Date: Thu, 17 Jun 2004 05:11:57 -0700 (PDT)
Message-ID: <20040617121157.55094.qmail@web90105.mail.scd.yahoo.com>


Grant,
Thanks for your response.

I've a typo error in my original question.

I got the following result which was what I'm looking for:
select textid, text from text_table
where contains(text,'{Lethal Weapon 2}')>0; TEXTID TEXT

--------  ---------------------
       2  Lethal Weapon 2

It returned the exact match I was looking for. However, if I changed the query to:
select textid, text from text_table
where contains(text,'{Lethal Weapon}')>0;

TEXTID TEXT

--------  ---------------------
       1  Lethal Weapon
       2  Lethal Weapon 2
       3  Lethal Weapon 4

It returned all the possible matches that contain "Lethal Weapon". I would like Oracle Text to return just "Lethal Weapon".

I tried changing '>0' to '=100' but it returned no record.

select textid, text, score(100) from text_table where contains(text,'{Lethal Weapon}',100)=100;

no rows selected

To my understanding, '>0' or '=100', etc is the score. I do not know why the scores for each record returned below are the same ie '5'. I would think that the exact string match "Lethal Weapon" would get a higher score than "Lethal Weapon 2" or "Lethal Weapon 4"??

select textid, text, score(100) from text_table where contains(text,'{Lethal Weapon}',100)>0;

TEXTID    TEXT                     score(100)
--------  ---------------------    ----------
       1  Lethal Weapon                     5
       2  Lethal Weapon 2                   5
       3  Lethal Weapon 4                   5
    

Any one? Thanks for any assistance you can provide..

susan


Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard. http://promotions.yahoo.com/new_mail

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 Thu Jun 17 2004 - 07:08:42 CDT

Original text of this message

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