You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/yamlRestTest/resources/rest-api-spec/test/inference/90_semantic_text_highlighter.yml
+75-44Lines changed: 75 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -745,81 +745,52 @@ setup:
745
745
- match: { hits.hits.0.highlight.body.1: "You Know, for Search!" }
746
746
747
747
---
748
-
"Highlighting with type:bbq_disk index options as well as knn with similarity":
reason: semantic highlighter fix for knn with similarity
770
752
771
753
- do:
772
754
index:
773
-
index: test-dense-index-bbq_disk
755
+
index: test-dense-index
774
756
id: doc_1
775
757
body:
776
-
bbq_disk_body: [ "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides.", "You Know, for Search!", "For a moment, nothing happened. Then, after a second or so, nothing continued to happen." ]
777
758
body: [ "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides.", "You Know, for Search!", "For a moment, nothing happened. Then, after a second or so, nothing continued to happen." ]
778
759
- do:
779
760
index:
780
-
index: test-dense-index-bbq_disk
761
+
index: test-dense-index
781
762
id: doc_2
782
763
body:
783
-
bbq_disk_body: [ "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws."]
784
764
body: [ "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws."]
- match: { hits.hits.0.highlight.bbq_disk_body.0: "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides." }
782
+
- length: { hits.hits.0.highlight: 1 }
808
783
- length: { hits.hits.0.highlight.body: 1 }
809
784
- match: { hits.hits.0.highlight.body.0: "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides." }
- match: { hits.hits.1.highlight.bbq_disk_body.0: "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws." }
787
+
- length: { hits.hits.1.highlight: 1 }
815
788
- length: { hits.hits.1.highlight.body: 1 }
816
789
- match: { hits.hits.1.highlight.body.0: "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws." }
817
790
818
-
819
-
820
791
- do:
821
792
search:
822
-
index: test-dense-index-bbq_disk
793
+
index: test-dense-index
823
794
body:
824
795
query:
825
796
knn:
@@ -843,6 +814,65 @@ setup:
843
814
- match: { hits.hits.0.highlight.body.1: "You Know, for Search!" }
844
815
- match: { hits.hits.0.highlight.body.2: "For a moment, nothing happened. Then, after a second or so, nothing continued to happen."}
bbq_disk_body: [ "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides.", "You Know, for Search!", "For a moment, nothing happened. Then, after a second or so, nothing continued to happen." ]
844
+
- do:
845
+
index:
846
+
index: test-dense-index-bbq_disk
847
+
id: doc_2
848
+
body:
849
+
bbq_disk_body: [ "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws."]
- match: { hits.hits.0.highlight.bbq_disk_body.0: "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides." }
- match: { hits.hits.1.highlight.bbq_disk_body.0: "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws." }
875
+
846
876
- do:
847
877
search:
848
878
index: test-dense-index-bbq_disk
@@ -855,18 +885,19 @@ setup:
855
885
model_text: "What is Elasticsearch?"
856
886
k: 10
857
887
num_candidates: 10
858
-
similarity: 0.9977
888
+
similarity: 0.9975
859
889
highlight:
860
890
fields:
861
-
body:
891
+
bbq_disk_body:
862
892
type: "semantic"
863
-
number_of_fragments: 2
893
+
number_of_fragments: 3
864
894
865
895
- match: { hits.total.value: 1 }
866
896
- match: { hits.hits.0._id: "doc_1" }
867
-
- length: { hits.hits.0.highlight.body: 2 }
868
-
- match: { hits.hits.0.highlight.body.0: "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides." }
869
-
- match: { hits.hits.0.highlight.body.1: "For a moment, nothing happened. Then, after a second or so, nothing continued to happen."}
- match: { hits.hits.0.highlight.bbq_disk_body.0: "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides." }
899
+
- match: { hits.hits.0.highlight.bbq_disk_body.1: "You Know, for Search!" }
900
+
- match: { hits.hits.0.highlight.bbq_disk_body.2: "For a moment, nothing happened. Then, after a second or so, nothing continued to happen."}
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/yamlRestTest/resources/rest-api-spec/test/inference/90_semantic_text_highlighter_bwc.yml
+75-44Lines changed: 75 additions & 44 deletions
Original file line number
Diff line number
Diff line change
@@ -650,81 +650,52 @@ setup:
650
650
- match: { hits.hits.0.highlight.bbq_hnsw_field.0: "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides." }
651
651
652
652
---
653
-
"Highlighting with type:bbq_disk index options as well as knn with similarity":
reason: semantic highlighter fix for knn with similarity
675
657
676
658
- do:
677
659
index:
678
-
index: test-dense-index-bbq_disk
660
+
index: test-dense-index
679
661
id: doc_1
680
662
body:
681
-
bbq_disk_body: [ "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides.", "You Know, for Search!", "For a moment, nothing happened. Then, after a second or so, nothing continued to happen." ]
682
663
body: [ "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides.", "You Know, for Search!", "For a moment, nothing happened. Then, after a second or so, nothing continued to happen." ]
683
664
- do:
684
665
index:
685
-
index: test-dense-index-bbq_disk
666
+
index: test-dense-index
686
667
id: doc_2
687
668
body:
688
-
bbq_disk_body: [ "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws."]
689
669
body: [ "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws."]
- match: { hits.hits.0.highlight.bbq_disk_body.0: "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides." }
687
+
- length: { hits.hits.0.highlight: 1 }
713
688
- length: { hits.hits.0.highlight.body: 1 }
714
689
- match: { hits.hits.0.highlight.body.0: "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides." }
- match: { hits.hits.1.highlight.bbq_disk_body.0: "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws." }
692
+
- length: { hits.hits.1.highlight: 1 }
720
693
- length: { hits.hits.1.highlight.body: 1 }
721
694
- match: { hits.hits.1.highlight.body.0: "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws." }
722
695
723
-
724
-
725
696
- do:
726
697
search:
727
-
index: test-dense-index-bbq_disk
698
+
index: test-dense-index
728
699
body:
729
700
query:
730
701
knn:
@@ -748,6 +719,65 @@ setup:
748
719
- match: { hits.hits.0.highlight.body.1: "You Know, for Search!" }
749
720
- match: { hits.hits.0.highlight.body.2: "For a moment, nothing happened. Then, after a second or so, nothing continued to happen."}
bbq_disk_body: [ "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides.", "You Know, for Search!", "For a moment, nothing happened. Then, after a second or so, nothing continued to happen." ]
749
+
- do:
750
+
index:
751
+
index: test-dense-index-bbq_disk
752
+
id: doc_2
753
+
body:
754
+
bbq_disk_body: [ "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws."]
- match: { hits.hits.0.highlight.bbq_disk_body.0: "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides." }
- match: { hits.hits.1.highlight.bbq_disk_body.0: "Nothing travels faster than the speed of light with the possible exception of bad news, which obeys its own special laws." }
780
+
751
781
- do:
752
782
search:
753
783
index: test-dense-index-bbq_disk
@@ -760,18 +790,19 @@ setup:
760
790
model_text: "What is Elasticsearch?"
761
791
k: 10
762
792
num_candidates: 10
763
-
similarity: 0.9977
793
+
similarity: 0.9975
764
794
highlight:
765
795
fields:
766
-
body:
796
+
bbq_disk_body:
767
797
type: "semantic"
768
-
number_of_fragments: 2
798
+
number_of_fragments: 3
769
799
770
800
- match: { hits.total.value: 1 }
771
801
- match: { hits.hits.0._id: "doc_1" }
772
-
- length: { hits.hits.0.highlight.body: 2 }
773
-
- match: { hits.hits.0.highlight.body.0: "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides." }
774
-
- match: { hits.hits.0.highlight.body.1: "For a moment, nothing happened. Then, after a second or so, nothing continued to happen."}
- match: { hits.hits.0.highlight.bbq_disk_body.0: "ElasticSearch is an open source, distributed, RESTful, search engine which is built on top of Lucene internally and enjoys all the features it provides." }
804
+
- match: { hits.hits.0.highlight.bbq_disk_body.1: "You Know, for Search!" }
805
+
- match: { hits.hits.0.highlight.bbq_disk_body.2: "For a moment, nothing happened. Then, after a second or so, nothing continued to happen."}
0 commit comments