Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Text Score Computation
"jsfromynr" <jatinder.1975_at_gmail.com> wrote in message
news:1153486809.495016.296550_at_p79g2000cwp.googlegroups.com...
> Hello All,
>
> I am bit confused about the value of SCORE returned when using Conatins
> in where clause.
>
> tmpdata
> Name
> ---------
> jatinder singh
> singh jatinder
> raj kumar
>
>
> SQL> Select contains(name,'sin%',1),score(1) from tmpdata;
>
> CONTAINS(NAME,'SIN%',1) SCORE(1)
> ----------------------- ----------
> 6 6
> 6 6
> 0 0
>
> I found on google this ...
> /*************
> How Score is Computed
> ********/
> Score for each document is computed using the standard Salton formula:
> 3f(1+log(N/n))
> Where f is the frequency of the search term in the document,
> N is the total number of rows in the table,
> and n is the number of rows which contain the search term.
> This is converted into an integer in the range 0 - 100.
> Query operators like AND and OR operate on the scores of their
> operands.
>
> May be I am getting it wrong .
>
> 3*2(1+log(3/2)) it is above 8.43279065 . So how Score is actually
> computed??
>
> Because I am looking at some logic where I can found % Match for
> example.
> If I entered "sin" as a search string.
>
> "sin" is part of "singh" in first and second row. % Match should be 3/5
> = 60%
> "sing" is part of "singh" in first and second row. % Match should be
> 4/5 = 80%
> "singh" is part of "singh" in first and second row. % Match should be
> 5/5 = 100%
>
> Is there any method by which we can find it easily??
>
> With Warm regards
> Jatinder Singh
>
How did you figure 8.43279065 ?
log 3/2 = log 1.5 = .17. From what I read the log is base 10.
Probably due to the small sample it was rouned to 0.
Received on Sun Jul 23 2006 - 13:23:58 CDT