@@ -607,7 +607,7 @@ public void testIndexPrefixIndexTypes() throws IOException {
607
607
.startObject ("properties" ).startObject ("field" )
608
608
.field ("type" , "text" )
609
609
.field ("analyzer" , "english" )
610
- .startObject ("index_prefix " ).endObject ()
610
+ .startObject ("index_prefixes " ).endObject ()
611
611
.field ("index_options" , "offsets" )
612
612
.endObject ().endObject ().endObject ().endObject ());
613
613
@@ -623,7 +623,7 @@ public void testIndexPrefixIndexTypes() throws IOException {
623
623
.startObject ("properties" ).startObject ("field" )
624
624
.field ("type" , "text" )
625
625
.field ("analyzer" , "english" )
626
- .startObject ("index_prefix " ).endObject ()
626
+ .startObject ("index_prefixes " ).endObject ()
627
627
.field ("index_options" , "positions" )
628
628
.endObject ().endObject ().endObject ().endObject ());
629
629
@@ -640,7 +640,7 @@ public void testIndexPrefixIndexTypes() throws IOException {
640
640
.startObject ("properties" ).startObject ("field" )
641
641
.field ("type" , "text" )
642
642
.field ("analyzer" , "english" )
643
- .startObject ("index_prefix " ).endObject ()
643
+ .startObject ("index_prefixes " ).endObject ()
644
644
.field ("term_vector" , "with_positions_offsets" )
645
645
.endObject ().endObject ().endObject ().endObject ());
646
646
@@ -657,7 +657,7 @@ public void testIndexPrefixIndexTypes() throws IOException {
657
657
.startObject ("properties" ).startObject ("field" )
658
658
.field ("type" , "text" )
659
659
.field ("analyzer" , "english" )
660
- .startObject ("index_prefix " ).endObject ()
660
+ .startObject ("index_prefixes " ).endObject ()
661
661
.field ("term_vector" , "with_positions" )
662
662
.endObject ().endObject ().endObject ().endObject ());
663
663
@@ -682,7 +682,7 @@ public void testIndexPrefixMapping() throws IOException {
682
682
.startObject ("properties" ).startObject ("field" )
683
683
.field ("type" , "text" )
684
684
.field ("analyzer" , "english" )
685
- .startObject ("index_prefix " )
685
+ .startObject ("index_prefixes " )
686
686
.field ("min_chars" , 1 )
687
687
.field ("max_chars" , 10 )
688
688
.endObject ()
@@ -716,7 +716,7 @@ public void testIndexPrefixMapping() throws IOException {
716
716
.startObject ("properties" ).startObject ("field" )
717
717
.field ("type" , "text" )
718
718
.field ("analyzer" , "english" )
719
- .startObject ("index_prefix " ).endObject ()
719
+ .startObject ("index_prefixes " ).endObject ()
720
720
.endObject ().endObject ()
721
721
.endObject ().endObject ());
722
722
CompressedXContent json = new CompressedXContent (mapping );
@@ -741,7 +741,7 @@ public void testIndexPrefixMapping() throws IOException {
741
741
.startObject ("properties" ).startObject ("field" )
742
742
.field ("type" , "text" )
743
743
.field ("analyzer" , "english" )
744
- .startObject ("index_prefix " )
744
+ .startObject ("index_prefixes " )
745
745
.field ("min_chars" , 1 )
746
746
.field ("max_chars" , 10 )
747
747
.endObject ()
@@ -760,7 +760,7 @@ public void testIndexPrefixMapping() throws IOException {
760
760
.startObject ("properties" ).startObject ("field" )
761
761
.field ("type" , "text" )
762
762
.field ("analyzer" , "english" )
763
- .startObject ("index_prefix " )
763
+ .startObject ("index_prefixes " )
764
764
.field ("min_chars" , 1 )
765
765
.field ("max_chars" , 10 )
766
766
.endObject ()
@@ -783,7 +783,7 @@ public void testIndexPrefixMapping() throws IOException {
783
783
.startObject ("properties" ).startObject ("field" )
784
784
.field ("type" , "text" )
785
785
.field ("analyzer" , "english" )
786
- .startObject ("index_prefix " )
786
+ .startObject ("index_prefixes " )
787
787
.field ("min_chars" , 11 )
788
788
.field ("max_chars" , 10 )
789
789
.endObject ()
@@ -800,7 +800,7 @@ public void testIndexPrefixMapping() throws IOException {
800
800
.startObject ("properties" ).startObject ("field" )
801
801
.field ("type" , "text" )
802
802
.field ("analyzer" , "english" )
803
- .startObject ("index_prefix " )
803
+ .startObject ("index_prefixes " )
804
804
.field ("min_chars" , 0 )
805
805
.field ("max_chars" , 10 )
806
806
.endObject ()
@@ -817,7 +817,7 @@ public void testIndexPrefixMapping() throws IOException {
817
817
.startObject ("properties" ).startObject ("field" )
818
818
.field ("type" , "text" )
819
819
.field ("analyzer" , "english" )
820
- .startObject ("index_prefix " )
820
+ .startObject ("index_prefixes " )
821
821
.field ("min_chars" , 1 )
822
822
.field ("max_chars" , 25 )
823
823
.endObject ()
@@ -834,27 +834,27 @@ public void testIndexPrefixMapping() throws IOException {
834
834
.startObject ("properties" ).startObject ("field" )
835
835
.field ("type" , "text" )
836
836
.field ("analyzer" , "english" )
837
- .field ("index_prefix " , (String ) null )
837
+ .field ("index_prefixes " , (String ) null )
838
838
.endObject ().endObject ()
839
839
.endObject ().endObject ());
840
840
MapperParsingException e = expectThrows (MapperParsingException .class ,
841
841
() -> parser .parse ("type" , new CompressedXContent (badConfigMapping ))
842
842
);
843
- assertThat (e .getMessage (), containsString ("[index_prefix ] must not have a [null] value" ));
843
+ assertThat (e .getMessage (), containsString ("[index_prefixes ] must not have a [null] value" ));
844
844
}
845
845
846
846
{
847
847
String badConfigMapping = Strings .toString (XContentFactory .jsonBuilder ().startObject ().startObject ("type" )
848
848
.startObject ("properties" ).startObject ("field" )
849
849
.field ("type" , "text" )
850
850
.field ("index" , "false" )
851
- .startObject ("index_prefix " ).endObject ()
851
+ .startObject ("index_prefixes " ).endObject ()
852
852
.endObject ().endObject ()
853
853
.endObject ().endObject ());
854
854
IllegalArgumentException e = expectThrows (IllegalArgumentException .class ,
855
855
() -> parser .parse ("type" , new CompressedXContent (badConfigMapping ))
856
856
);
857
- assertThat (e .getMessage (), containsString ("Cannot set index_prefix on unindexed field [field]" ));
857
+ assertThat (e .getMessage (), containsString ("Cannot set index_prefixes on unindexed field [field]" ));
858
858
}
859
859
}
860
860
}
0 commit comments