@@ -607,7 +607,7 @@ public void testIndexPrefixIndexTypes() throws IOException {
607607 .startObject ("properties" ).startObject ("field" )
608608 .field ("type" , "text" )
609609 .field ("analyzer" , "english" )
610- .startObject ("index_prefix " ).endObject ()
610+ .startObject ("index_prefixes " ).endObject ()
611611 .field ("index_options" , "offsets" )
612612 .endObject ().endObject ().endObject ().endObject ());
613613
@@ -623,7 +623,7 @@ public void testIndexPrefixIndexTypes() throws IOException {
623623 .startObject ("properties" ).startObject ("field" )
624624 .field ("type" , "text" )
625625 .field ("analyzer" , "english" )
626- .startObject ("index_prefix " ).endObject ()
626+ .startObject ("index_prefixes " ).endObject ()
627627 .field ("index_options" , "positions" )
628628 .endObject ().endObject ().endObject ().endObject ());
629629
@@ -640,7 +640,7 @@ public void testIndexPrefixIndexTypes() throws IOException {
640640 .startObject ("properties" ).startObject ("field" )
641641 .field ("type" , "text" )
642642 .field ("analyzer" , "english" )
643- .startObject ("index_prefix " ).endObject ()
643+ .startObject ("index_prefixes " ).endObject ()
644644 .field ("term_vector" , "with_positions_offsets" )
645645 .endObject ().endObject ().endObject ().endObject ());
646646
@@ -657,7 +657,7 @@ public void testIndexPrefixIndexTypes() throws IOException {
657657 .startObject ("properties" ).startObject ("field" )
658658 .field ("type" , "text" )
659659 .field ("analyzer" , "english" )
660- .startObject ("index_prefix " ).endObject ()
660+ .startObject ("index_prefixes " ).endObject ()
661661 .field ("term_vector" , "with_positions" )
662662 .endObject ().endObject ().endObject ().endObject ());
663663
@@ -682,7 +682,7 @@ public void testIndexPrefixMapping() throws IOException {
682682 .startObject ("properties" ).startObject ("field" )
683683 .field ("type" , "text" )
684684 .field ("analyzer" , "english" )
685- .startObject ("index_prefix " )
685+ .startObject ("index_prefixes " )
686686 .field ("min_chars" , 1 )
687687 .field ("max_chars" , 10 )
688688 .endObject ()
@@ -716,7 +716,7 @@ public void testIndexPrefixMapping() throws IOException {
716716 .startObject ("properties" ).startObject ("field" )
717717 .field ("type" , "text" )
718718 .field ("analyzer" , "english" )
719- .startObject ("index_prefix " ).endObject ()
719+ .startObject ("index_prefixes " ).endObject ()
720720 .endObject ().endObject ()
721721 .endObject ().endObject ());
722722 CompressedXContent json = new CompressedXContent (mapping );
@@ -741,7 +741,7 @@ public void testIndexPrefixMapping() throws IOException {
741741 .startObject ("properties" ).startObject ("field" )
742742 .field ("type" , "text" )
743743 .field ("analyzer" , "english" )
744- .startObject ("index_prefix " )
744+ .startObject ("index_prefixes " )
745745 .field ("min_chars" , 1 )
746746 .field ("max_chars" , 10 )
747747 .endObject ()
@@ -760,7 +760,7 @@ public void testIndexPrefixMapping() throws IOException {
760760 .startObject ("properties" ).startObject ("field" )
761761 .field ("type" , "text" )
762762 .field ("analyzer" , "english" )
763- .startObject ("index_prefix " )
763+ .startObject ("index_prefixes " )
764764 .field ("min_chars" , 1 )
765765 .field ("max_chars" , 10 )
766766 .endObject ()
@@ -783,7 +783,7 @@ public void testIndexPrefixMapping() throws IOException {
783783 .startObject ("properties" ).startObject ("field" )
784784 .field ("type" , "text" )
785785 .field ("analyzer" , "english" )
786- .startObject ("index_prefix " )
786+ .startObject ("index_prefixes " )
787787 .field ("min_chars" , 11 )
788788 .field ("max_chars" , 10 )
789789 .endObject ()
@@ -800,7 +800,7 @@ public void testIndexPrefixMapping() throws IOException {
800800 .startObject ("properties" ).startObject ("field" )
801801 .field ("type" , "text" )
802802 .field ("analyzer" , "english" )
803- .startObject ("index_prefix " )
803+ .startObject ("index_prefixes " )
804804 .field ("min_chars" , 0 )
805805 .field ("max_chars" , 10 )
806806 .endObject ()
@@ -817,7 +817,7 @@ public void testIndexPrefixMapping() throws IOException {
817817 .startObject ("properties" ).startObject ("field" )
818818 .field ("type" , "text" )
819819 .field ("analyzer" , "english" )
820- .startObject ("index_prefix " )
820+ .startObject ("index_prefixes " )
821821 .field ("min_chars" , 1 )
822822 .field ("max_chars" , 25 )
823823 .endObject ()
@@ -834,27 +834,27 @@ public void testIndexPrefixMapping() throws IOException {
834834 .startObject ("properties" ).startObject ("field" )
835835 .field ("type" , "text" )
836836 .field ("analyzer" , "english" )
837- .field ("index_prefix " , (String ) null )
837+ .field ("index_prefixes " , (String ) null )
838838 .endObject ().endObject ()
839839 .endObject ().endObject ());
840840 MapperParsingException e = expectThrows (MapperParsingException .class ,
841841 () -> parser .parse ("type" , new CompressedXContent (badConfigMapping ))
842842 );
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" ));
844844 }
845845
846846 {
847847 String badConfigMapping = Strings .toString (XContentFactory .jsonBuilder ().startObject ().startObject ("type" )
848848 .startObject ("properties" ).startObject ("field" )
849849 .field ("type" , "text" )
850850 .field ("index" , "false" )
851- .startObject ("index_prefix " ).endObject ()
851+ .startObject ("index_prefixes " ).endObject ()
852852 .endObject ().endObject ()
853853 .endObject ().endObject ());
854854 IllegalArgumentException e = expectThrows (IllegalArgumentException .class ,
855855 () -> parser .parse ("type" , new CompressedXContent (badConfigMapping ))
856856 );
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]" ));
858858 }
859859 }
860860}
0 commit comments