@@ -643,24 +643,24 @@ def test_explaincli(client):
643
643
644
644
645
645
@pytest .mark .redismod
646
- @skip_if_server_version_gte ("7.9.0" )
647
646
def test_summarize (client ):
648
647
createIndex (client .ft ())
649
648
waitForIndex (client , getattr (client .ft (), "index_name" , "idx" ))
650
649
651
- q = Query ("king henry" ).paging (0 , 1 )
650
+ q = Query ("\" king henry\" " ).paging (0 , 1 )
652
651
q .highlight (fields = ("play" , "txt" ), tags = ("<b>" , "</b>" ))
653
652
q .summarize ("txt" )
654
653
655
654
if is_resp2_connection (client ):
655
+ print (client .ft ().search (q ).docs )
656
656
doc = sorted (client .ft ().search (q ).docs )[0 ]
657
657
assert "<b>Henry</b> IV" == doc .play
658
658
assert (
659
659
"ACT I SCENE I. London. The palace. Enter <b>KING</b> <b>HENRY</b>, LORD JOHN OF LANCASTER, the EARL of WESTMORELAND, SIR... " # noqa
660
660
== doc .txt
661
661
)
662
662
663
- q = Query ("king henry" ).paging (0 , 1 ).summarize ().highlight ()
663
+ q = Query ("\" king henry\" " ).paging (0 , 1 ).summarize ().highlight ()
664
664
665
665
doc = sorted (client .ft ().search (q ).docs )[0 ]
666
666
assert "<b>Henry</b> ... " == doc .play
@@ -676,7 +676,7 @@ def test_summarize(client):
676
676
== doc ["extra_attributes" ]["txt" ]
677
677
)
678
678
679
- q = Query ("king henry" ).paging (0 , 1 ).summarize ().highlight ()
679
+ q = Query ("\" king henry\" " ).paging (0 , 1 ).summarize ().highlight ()
680
680
681
681
doc = sorted (client .ft ().search (q )["results" ])[0 ]
682
682
assert "<b>Henry</b> ... " == doc ["extra_attributes" ]["play" ]
0 commit comments