jatinder.1975@gmail.com *nix forums beginner
Joined: 21 Apr 2006
Posts: 29
|
Posted: Fri Jul 21, 2006 1:00 pm Post subject:
Oracle Text Score Computation
|
|
|
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 |
|