mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Significantly improve ranking:
1) rank_cd now use weight of lexemes 2) rank_cd and rank can use any combination of normalization methods: no normalization normalization by log(length of document) -----/------- by length of document -----/------- by number of unique word in document -----/------- by log(number of unique word in document) -----/------- by number of covers (only rank_cd) Improve cover's search. TODO: changes in documentation
This commit is contained in:
@ -2315,9 +2315,9 @@ An hour of storm to place
|
||||
The sculpture of these granite seams,
|
||||
Upon a woman s face. E. J. Pratt (1882 1964)
|
||||
'), to_tsquery('sea&thousand&years'));
|
||||
rank_cd
|
||||
---------
|
||||
1.2
|
||||
rank_cd
|
||||
-----------
|
||||
0.0555556
|
||||
(1 row)
|
||||
|
||||
select rank_cd(to_tsvector('Erosion It took the sea a thousand years,
|
||||
@ -2329,9 +2329,9 @@ An hour of storm to place
|
||||
The sculpture of these granite seams,
|
||||
Upon a woman s face. E. J. Pratt (1882 1964)
|
||||
'), to_tsquery('granite&sea'));
|
||||
rank_cd
|
||||
----------
|
||||
0.880303
|
||||
rank_cd
|
||||
-----------
|
||||
0.0238095
|
||||
(1 row)
|
||||
|
||||
select rank_cd(to_tsvector('Erosion It took the sea a thousand years,
|
||||
@ -2345,7 +2345,7 @@ Upon a woman s face. E. J. Pratt (1882 1964)
|
||||
'), to_tsquery('sea'));
|
||||
rank_cd
|
||||
---------
|
||||
2
|
||||
0.2
|
||||
(1 row)
|
||||
|
||||
select get_covers(to_tsvector('Erosion It took the sea a thousand years,
|
||||
|
Reference in New Issue
Block a user