@@ -479,95 +479,110 @@ SELECT plainto_tsquery('english', 'foo bar') && 'asd | fg';
479
479
'foo' & 'bar' & ( 'asd' | 'fg' )
480
480
(1 row)
481
481
482
- SELECT ts_rank_cd(to_tsvector('english', 'Erosion It took the sea a thousand years,
483
- A thousand years to trace
484
- The granite features of this cliff
485
- In crag and scarp and base.
486
- It took the sea an hour one night
487
- An hour of storm to place
488
- The sculpture of these granite seams,
489
- Upon a woman s face. E. J. Pratt (1882 1964)
490
- '), to_tsquery('english', 'sea&thousand&years'));
482
+ SELECT ts_rank_cd(to_tsvector('english', '
483
+ Day after day, day after day,
484
+ We stuck, nor breath nor motion,
485
+ As idle as a painted Ship
486
+ Upon a painted Ocean.
487
+ Water, water, every where
488
+ And all the boards did shrink;
489
+ Water, water, every where,
490
+ Nor any drop to drink.
491
+ William Wordsworth (1770-1850)
492
+ '), to_tsquery('english', 'paint&water'));
491
493
ts_rank_cd
492
494
------------
493
- 0.0555556
494
- (1 row)
495
-
496
- SELECT ts_rank_cd(to_tsvector('english', 'Erosion It took the sea a thousand years,
497
- A thousand years to trace
498
- The granite features of this cliff
499
- In crag and scarp and base.
500
- It took the sea an hour one night
501
- An hour of storm to place
502
- The sculpture of these granite seams,
503
- Upon a woman s face. E. J. Pratt (1882 1964)
504
- '), to_tsquery('english', 'granite&sea'));
495
+ 0.05
496
+ (1 row)
497
+
498
+ SELECT ts_rank_cd(to_tsvector('english', '
499
+ Day after day, day after day,
500
+ We stuck, nor breath nor motion,
501
+ As idle as a painted Ship
502
+ Upon a painted Ocean.
503
+ Water, water, every where
504
+ And all the boards did shrink;
505
+ Water, water, every where,
506
+ Nor any drop to drink.
507
+ William Wordsworth (1770-1850)
508
+ '), to_tsquery('english', 'breath&motion&water'));
505
509
ts_rank_cd
506
510
------------
507
- 0.0238095
508
- (1 row)
509
-
510
- SELECT ts_rank_cd(to_tsvector('english', 'Erosion It took the sea a thousand years,
511
- A thousand years to trace
512
- The granite features of this cliff
513
- In crag and scarp and base.
514
- It took the sea an hour one night
515
- An hour of storm to place
516
- The sculpture of these granite seams,
517
- Upon a woman s face. E. J. Pratt (1882 1964)
518
- '), to_tsquery('english', 'sea'));
511
+ 0.00833333
512
+ (1 row)
513
+
514
+ SELECT ts_rank_cd(to_tsvector('english', '
515
+ Day after day, day after day,
516
+ We stuck, nor breath nor motion,
517
+ As idle as a painted Ship
518
+ Upon a painted Ocean.
519
+ Water, water, every where
520
+ And all the boards did shrink;
521
+ Water, water, every where,
522
+ Nor any drop to drink.
523
+ William Wordsworth (1770-1850)
524
+ '), to_tsquery('english', 'ocean'));
519
525
ts_rank_cd
520
526
------------
521
- 0.2
527
+ 0.1
522
528
(1 row)
523
529
524
530
--headline tests
525
- SELECT ts_headline('english', 'Erosion It took the sea a thousand years,
526
- A thousand years to trace
527
- The granite features of this cliff
528
- In crag and scarp and base.
529
- It took the sea an hour one night
530
- An hour of storm to place
531
- The sculpture of these granite seams,
532
- Upon a woman s face. E. J. Pratt (1882 1964)
533
- ', to_tsquery('english', 'sea&thousand&years'));
534
- ts_headline
535
- --------------------------------------------
536
- <b>sea</b> a <b>thousand</b> <b>years</b>,
537
- A <b>thousand</b> <b>years</b> to trace
538
- The granite features of this cliff
539
- (1 row)
540
-
541
- SELECT ts_headline('english', 'Erosion It took the sea a thousand years,
542
- A thousand years to trace
543
- The granite features of this cliff
544
- In crag and scarp and base.
545
- It took the sea an hour one night
546
- An hour of storm to place
547
- The sculpture of these granite seams,
548
- Upon a woman s face. E. J. Pratt (1882 1964)
549
- ', to_tsquery('english', 'granite&sea'));
550
- ts_headline
551
- -------------------------------------------
552
- <b>sea</b> a thousand years,
553
- A thousand years to trace
554
- The <b>granite</b> features of this cliff
555
- (1 row)
556
-
557
- SELECT ts_headline('english', 'Erosion It took the sea a thousand years,
558
- A thousand years to trace
559
- The granite features of this cliff
560
- In crag and scarp and base.
561
- It took the sea an hour one night
562
- An hour of storm to place
563
- The sculpture of these granite seams,
564
- Upon a woman s face. E. J. Pratt (1882 1964)
565
- ', to_tsquery('english', 'sea'));
566
- ts_headline
567
- ------------------------------------
568
- <b>sea</b> a thousand years,
569
- A thousand years to trace
570
- The granite features of this cliff
531
+ SELECT ts_headline('english', '
532
+ Day after day, day after day,
533
+ We stuck, nor breath nor motion,
534
+ As idle as a painted Ship
535
+ Upon a painted Ocean.
536
+ Water, water, every where
537
+ And all the boards did shrink;
538
+ Water, water, every where,
539
+ Nor any drop to drink.
540
+ William Wordsworth (1770-1850)
541
+ ', to_tsquery('english', 'paint&water'));
542
+ ts_headline
543
+ -----------------------------------------
544
+ <b>painted</b> Ocean.
545
+ <b>Water</b>, <b>water</b>, every where
546
+ And all the boards did shrink;
547
+ <b>Water</b>, <b>water</b>, every
548
+ (1 row)
549
+
550
+ SELECT ts_headline('english', '
551
+ Day after day, day after day,
552
+ We stuck, nor breath nor motion,
553
+ As idle as a painted Ship
554
+ Upon a painted Ocean.
555
+ Water, water, every where
556
+ And all the boards did shrink;
557
+ Water, water, every where,
558
+ Nor any drop to drink.
559
+ William Wordsworth (1770-1850)
560
+ ', to_tsquery('english', 'breath&motion&water'));
561
+ ts_headline
562
+ ----------------------------------
563
+ <b>breath</b> nor <b>motion</b>,
564
+ As idle as a painted Ship
565
+ Upon a painted Ocean.
566
+ <b>Water</b>, <b>water</b>
567
+ (1 row)
568
+
569
+ SELECT ts_headline('english', '
570
+ Day after day, day after day,
571
+ We stuck, nor breath nor motion,
572
+ As idle as a painted Ship
573
+ Upon a painted Ocean.
574
+ Water, water, every where
575
+ And all the boards did shrink;
576
+ Water, water, every where,
577
+ Nor any drop to drink.
578
+ William Wordsworth (1770-1850)
579
+ ', to_tsquery('english', 'ocean'));
580
+ ts_headline
581
+ ----------------------------------
582
+ <b>Ocean</b>.
583
+ Water, water, every where
584
+ And all the boards did shrink;
585
+ Water, water, every where
571
586
(1 row)
572
587
573
588
SELECT ts_headline('english', '
0 commit comments