File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
main/java/org/elasticsearch/index/mapper
test/java/org/elasticsearch/index/mapper Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ public static class Builder extends FieldMapper.Builder<Builder> {
6767
6868 public Builder (String name ) {
6969 super (name , Defaults .FIELD_TYPE );
70+ hasDocValues = false ;
7071 builder = this ;
7172 }
7273
@@ -207,6 +208,16 @@ protected void parseCreateField(ParseContext context) throws IOException {
207208
208209 }
209210
211+ @ Override
212+ protected boolean indexedByDefault () {
213+ return false ;
214+ }
215+
216+ @ Override
217+ protected boolean docValuesByDefault () {
218+ return false ;
219+ }
220+
210221 @ Override
211222 protected void mergeOptions (FieldMapper other , List <String > conflicts ) {
212223
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ public void testDefaultMapping() throws Exception {
7474
7575 assertThat (mapper , instanceOf (BinaryFieldMapper .class ));
7676 assertThat (mapper .fieldType .stored (), equalTo (false ));
77+
78+ assertEquals (Strings .toString (mapping ), Strings .toString (mapperService .documentMapper ()));
7779 }
7880
7981 public void testStoredValue () throws IOException {
You can’t perform that action at this time.
0 commit comments