aboutsummaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-12-14 11:28:18 +0100
committerJon Bratseth <bratseth@oath.com>2018-12-14 11:28:18 +0100
commitb4e3917d746fcf4be76d353be7c3b4ae9b229973 (patch)
tree9bbc8f32467adbc022ff1464e0e3514076c79a36 /config-model
parent7b8bb9e7e84c43240457e24bd846291c24221747 (diff)
Support for configuring and feeding float16 and bool field types
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/documentmodel/DataTypeRepo.java4
-rw-r--r--config-model/src/main/java/com/yahoo/documentmodel/DocumentTypeCollection.java8
-rw-r--r--config-model/src/main/java/com/yahoo/documentmodel/DocumentTypeRepo.java4
-rw-r--r--config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java6
-rw-r--r--config-model/src/main/java/com/yahoo/documentmodel/VespaDocumentType.java4
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClassField.java9
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/derived/VsmFields.java45
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/document/Attribute.java10
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java56
-rw-r--r--config-model/src/main/java/com/yahoo/searchdefinition/document/Sorting.java2
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java4
-rw-r--r--config-model/src/main/javacc/SDParser.jj14
-rw-r--r--config-model/src/test/derived/types/attributes.cfg42
-rw-r--r--config-model/src/test/derived/types/documentmanager.cfg8
-rw-r--r--config-model/src/test/derived/types/ilscripts.cfg4
-rw-r--r--config-model/src/test/derived/types/index-info.cfg12
-rw-r--r--config-model/src/test/derived/types/summary.cfg14
-rw-r--r--config-model/src/test/derived/types/summarymap.cfg6
-rw-r--r--config-model/src/test/derived/types/types.sd8
-rw-r--r--config-model/src/test/derived/types/vsmsummary.cfg6
20 files changed, 195 insertions, 71 deletions
diff --git a/config-model/src/main/java/com/yahoo/documentmodel/DataTypeRepo.java b/config-model/src/main/java/com/yahoo/documentmodel/DataTypeRepo.java
index cb4b3f6f532..7e5f393c3e0 100644
--- a/config-model/src/main/java/com/yahoo/documentmodel/DataTypeRepo.java
+++ b/config-model/src/main/java/com/yahoo/documentmodel/DataTypeRepo.java
@@ -12,8 +12,8 @@ import java.util.Map;
*/
public class DataTypeRepo implements DataTypeCollection {
- Map<Integer, DataType> typeById = new LinkedHashMap<>();
- Map<String, DataType> typeByName = new LinkedHashMap<>();
+ private Map<Integer, DataType> typeById = new LinkedHashMap<>();
+ private Map<String, DataType> typeByName = new LinkedHashMap<>();
public DataType getDataType(String name) {
return typeByName.get(name);
diff --git a/config-model/src/main/java/com/yahoo/documentmodel/DocumentTypeCollection.java b/config-model/src/main/java/com/yahoo/documentmodel/DocumentTypeCollection.java
index 3e711a48109..debb22ece9e 100644
--- a/config-model/src/main/java/com/yahoo/documentmodel/DocumentTypeCollection.java
+++ b/config-model/src/main/java/com/yahoo/documentmodel/DocumentTypeCollection.java
@@ -7,7 +7,9 @@ import java.util.Collection;
* @author baldersheim
*/
public interface DocumentTypeCollection {
- public NewDocumentType getDocumentType(NewDocumentType.Name name);
- public NewDocumentType getDocumentType(int id);
- public Collection<NewDocumentType> getTypes();
+
+ NewDocumentType getDocumentType(NewDocumentType.Name name);
+ NewDocumentType getDocumentType(int id);
+ Collection<NewDocumentType> getTypes();
+
}
diff --git a/config-model/src/main/java/com/yahoo/documentmodel/DocumentTypeRepo.java b/config-model/src/main/java/com/yahoo/documentmodel/DocumentTypeRepo.java
index 5138caf0b28..7ab8d0f1d8d 100644
--- a/config-model/src/main/java/com/yahoo/documentmodel/DocumentTypeRepo.java
+++ b/config-model/src/main/java/com/yahoo/documentmodel/DocumentTypeRepo.java
@@ -10,8 +10,8 @@ import java.util.Map;
*/
public class DocumentTypeRepo implements DocumentTypeCollection {
- final Map<Integer, NewDocumentType> typeById = new LinkedHashMap<>();
- final Map<NewDocumentType.Name, NewDocumentType> typeByName = new LinkedHashMap<>();
+ private final Map<Integer, NewDocumentType> typeById = new LinkedHashMap<>();
+ private final Map<NewDocumentType.Name, NewDocumentType> typeByName = new LinkedHashMap<>();
public final NewDocumentType getDocumentType(String name) {
return typeByName.get(new NewDocumentType.Name(name));
diff --git a/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java b/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
index 06bb32213f9..fc42864f1d0 100644
--- a/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
+++ b/config-model/src/main/java/com/yahoo/documentmodel/NewDocumentType.java
@@ -32,7 +32,6 @@ import static java.util.Collections.emptySet;
*/
public final class NewDocumentType extends StructuredDataType implements DataTypeCollection {
-
public static final class Name {
// TODO: privatize
@@ -381,10 +380,7 @@ public final class NewDocumentType extends StructuredDataType implements DataTyp
return this;
}
- /**
- * The field sets defined for this type and its {@link Search}
- * @return fieldsets
- */
+ /** The field sets defined for this type and its {@link Search} */
public Set<FieldSet> getFieldSets() {
return Collections.unmodifiableSet(fieldSets);
}
diff --git a/config-model/src/main/java/com/yahoo/documentmodel/VespaDocumentType.java b/config-model/src/main/java/com/yahoo/documentmodel/VespaDocumentType.java
index 2f2c308e633..69fe6f74d27 100644
--- a/config-model/src/main/java/com/yahoo/documentmodel/VespaDocumentType.java
+++ b/config-model/src/main/java/com/yahoo/documentmodel/VespaDocumentType.java
@@ -6,7 +6,7 @@ import com.yahoo.document.DataTypeName;
import com.yahoo.document.PositionDataType;
/**
- * This class represents the builtin 'doument' document type that all other documenttypes inherits.
+ * This class represents the builtin 'document' document type that all other documenttypes inherits.
* Remember that changes here must be compatible. Changes to types of fields can not be done here.
* This must also match the mirroring class in c++.
*
@@ -32,6 +32,8 @@ public class VespaDocumentType {
vespa.add(PositionDataType.INSTANCE);
vespa.add(DataType.URI);
vespa.add(DataType.PREDICATE);
+ vespa.add(DataType.BOOL);
+ vespa.add(DataType.FLOAT16);
return vespa;
}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClassField.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClassField.java
index bdfebfd0546..4375b446e98 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClassField.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/SummaryClassField.java
@@ -22,10 +22,12 @@ public class SummaryClassField {
/** The summary field type enumeration */
public enum Type {
+ BOOL("bool"),
BYTE("byte"),
SHORT("short"),
INTEGER("integer"),
INT64("int64"),
+ FLOAT16("float16"),
FLOAT("float"),
DOUBLE("double"),
STRING("string"),
@@ -77,10 +79,14 @@ public class SummaryClassField {
return Type.INTEGER;
} else if (fval instanceof LongFieldValue) {
return Type.INT64;
+ } else if (fval instanceof Float16FieldValue) {
+ return Type.FLOAT16;
} else if (fval instanceof FloatFieldValue) {
return Type.FLOAT;
} else if (fval instanceof DoubleFieldValue) {
return Type.DOUBLE;
+ } else if (fval instanceof BoolFieldValue) {
+ return Type.BOOL;
} else if (fval instanceof ByteFieldValue) {
return Type.BYTE;
} else if (fval instanceof Raw) {
@@ -102,8 +108,7 @@ public class SummaryClassField {
} else if (fieldType instanceof ReferenceDataType) {
return Type.LONGSTRING;
} else {
- throw new IllegalArgumentException("Don't know which summary type to " +
- "convert " + fieldType + " to");
+ throw new IllegalArgumentException("Don't know which summary type to convert " + fieldType + " to");
}
}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/derived/VsmFields.java b/config-model/src/main/java/com/yahoo/searchdefinition/derived/VsmFields.java
index ef85c0617bc..3f1474704fe 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/derived/VsmFields.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/derived/VsmFields.java
@@ -1,8 +1,16 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.searchdefinition.derived;
-import com.yahoo.document.*;
-import com.yahoo.document.datatypes.*;
+import com.yahoo.document.CollectionDataType;
+import com.yahoo.document.DataType;
+import com.yahoo.document.NumericDataType;
+import com.yahoo.document.ReferenceDataType;
+import com.yahoo.document.datatypes.BoolFieldValue;
+import com.yahoo.document.datatypes.FieldValue;
+import com.yahoo.document.datatypes.PredicateFieldValue;
+import com.yahoo.document.datatypes.Raw;
+import com.yahoo.document.datatypes.StringFieldValue;
+import com.yahoo.document.datatypes.TensorFieldValue;
import com.yahoo.searchdefinition.FieldSets;
import com.yahoo.searchdefinition.Search;
import com.yahoo.searchdefinition.document.FieldSet;
@@ -114,14 +122,16 @@ public class VsmFields extends Derived implements VsmfieldsConfig.Producer {
/** The streaming field type enumeration */
public static class Type {
- public static Type INT8=new Type("int8","INT8");
- public static Type INT16=new Type("int16","INT16");
- public static Type INT32=new Type("int32","INT32");
- public static Type INT64=new Type("int64","INT64");
- public static Type FLOAT=new Type("float","FLOAT");
- public static Type DOUBLE=new Type("double","DOUBLE");
- public static Type STRING=new Type("string","AUTOUTF8");
- public static Type UNSEARCHABLESTRING=new Type("string","NONE");
+ public static Type INT8 = new Type("int8","INT8");
+ public static Type INT16 = new Type("int16","INT16");
+ public static Type INT32 = new Type("int32","INT32");
+ public static Type INT64 = new Type("int64","INT64");
+ public static Type FLOAT16 = new Type("float16", "FLOAT16");
+ public static Type FLOAT = new Type("float","FLOAT");
+ public static Type DOUBLE = new Type("double","DOUBLE");
+ public static Type STRING = new Type("string","AUTOUTF8");
+ public static Type BOOL = new Type("bool","BOOL");
+ public static Type UNSEARCHABLESTRING = new Type("string","NONE");
private String name;
@@ -148,6 +158,7 @@ public class VsmFields extends Derived implements VsmfieldsConfig.Producer {
return this.name.equals(((Type)other).name);
}
+ @Override
public String toString() {
return "type: " + name;
}
@@ -168,18 +179,24 @@ public class VsmFields extends Derived implements VsmfieldsConfig.Producer {
/** Converts to the right index type from a field datatype */
private static Type convertType(DataType fieldType) {
FieldValue fval = fieldType.createFieldValue();
- if (fieldType.equals(DataType.FLOAT)) {
+ if (fieldType.equals(DataType.FLOAT16)) {
+ return Type.FLOAT16;
+ } else if (fieldType.equals(DataType.FLOAT)) {
return Type.FLOAT;
} else if (fieldType.equals(DataType.LONG)) {
return Type.INT64;
} else if (fieldType.equals(DataType.DOUBLE)) {
return Type.DOUBLE;
+ } else if (fieldType.equals(DataType.BOOL)) {
+ return Type.BOOL;
} else if (fieldType.equals(DataType.BYTE)) {
return Type.INT8;
} else if (fieldType instanceof NumericDataType) {
return Type.INT32;
} else if (fval instanceof StringFieldValue) {
return Type.STRING;
+ } else if (fval instanceof BoolFieldValue) {
+ return Type.BOOL;
} else if (fval instanceof Raw) {
return Type.STRING;
} else if (fval instanceof PredicateFieldValue) {
@@ -191,8 +208,8 @@ public class VsmFields extends Derived implements VsmfieldsConfig.Producer {
} else if (fieldType instanceof ReferenceDataType) {
return Type.UNSEARCHABLESTRING;
} else {
- throw new IllegalArgumentException("Don't know which streaming" +
- " field type to " + "convert " + fieldType + " to");
+ throw new IllegalArgumentException("Don't know which streaming field type to convert " +
+ fieldType + " to");
}
}
@@ -245,6 +262,7 @@ public class VsmFields extends Derived implements VsmfieldsConfig.Producer {
}
private static class StreamingDocumentType {
+
private final String name;
private final Map<String, FieldSet> fieldSets = new LinkedHashMap<>();
private final Map<String, FieldSet> userFieldSets;
@@ -282,4 +300,5 @@ public class VsmFields extends Derived implements VsmfieldsConfig.Producer {
fs.addFieldName(fieldName);
}
}
+
}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/document/Attribute.java b/config-model/src/main/java/com/yahoo/searchdefinition/document/Attribute.java
index bdd027f4687..fbcaf2a3a80 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/document/Attribute.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/document/Attribute.java
@@ -11,6 +11,7 @@ import com.yahoo.document.StructuredDataType;
import com.yahoo.document.TemporaryStructuredDataType;
import com.yahoo.document.TensorDataType;
import com.yahoo.document.WeightedSetDataType;
+import com.yahoo.document.datatypes.BoolFieldValue;
import com.yahoo.document.datatypes.ByteFieldValue;
import com.yahoo.document.datatypes.DoubleFieldValue;
import com.yahoo.document.datatypes.FieldValue;
@@ -19,6 +20,7 @@ import com.yahoo.document.datatypes.IntegerFieldValue;
import com.yahoo.document.datatypes.LongFieldValue;
import com.yahoo.document.datatypes.PredicateFieldValue;
import com.yahoo.document.datatypes.Raw;
+import com.yahoo.document.datatypes.Float16FieldValue;
import com.yahoo.document.datatypes.StringFieldValue;
import com.yahoo.document.datatypes.TensorFieldValue;
import com.yahoo.tensor.TensorType;
@@ -82,9 +84,11 @@ public final class Attribute implements Cloneable, Serializable {
SHORT("short", "INT16"),
INTEGER("integer", "INT32"),
LONG("long", "INT64"),
+ FLOAT16("float16", "FLOAT16"),
FLOAT("float", "FLOAT"),
DOUBLE("double", "DOUBLE"),
STRING("string", "STRING"),
+ BOOL("bool", "BOOL"),
PREDICATE("predicate", "PREDICATE"),
TENSOR("tensor", "TENSOR"),
REFERENCE("reference", "REFERENCE");
@@ -235,6 +239,10 @@ public final class Attribute implements Cloneable, Serializable {
return Type.FLOAT;
} else if (fval instanceof DoubleFieldValue) {
return Type.DOUBLE;
+ } else if (fval instanceof BoolFieldValue) {
+ return Type.BOOL;
+ } else if (fval instanceof Float16FieldValue) {
+ return Type.FLOAT16;
} else if (fval instanceof ByteFieldValue) {
return Type.BYTE;
} else if (fval instanceof Raw) {
@@ -288,8 +296,10 @@ public final class Attribute implements Cloneable, Serializable {
case STRING : return DataType.STRING;
case INTEGER: return DataType.INT;
case LONG: return DataType.LONG;
+ case FLOAT16: return DataType.FLOAT16;
case FLOAT: return DataType.FLOAT;
case DOUBLE: return DataType.DOUBLE;
+ case BOOL: return DataType.BOOL;
case BYTE: return DataType.BYTE;
case PREDICATE: return DataType.PREDICATE;
case TENSOR: return DataType.getTensor(tensorType.orElseThrow(IllegalStateException::new));
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java b/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java
index d2d28dadfda..16e1e2e4e1d 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/document/SDField.java
@@ -146,14 +146,13 @@ public class SDField extends Field implements TypedKey, FieldOperationContainer,
}
/**
- Creates a new field.
-
- @param name The name of the field
- @param dataType The datatype of the field
- @param isHeader Whether this is a "header" field or a "content" field
- (true = "header").
- @param owner the owning document (used to check for id collisions)
- */
+ * Creates a new field.
+ *
+ * @param name The name of the field
+ * @param dataType The datatype of the field
+ * @param isHeader Whether this is a "header" field or a "content" field (true = "header").
+ * @param owner the owning document (used to check for id collisions)
+ */
protected SDField(SDDocumentType repo, String name, DataType dataType, boolean isHeader, SDDocumentType owner, boolean populate) {
super(name, dataType, isHeader, owner == null ? null : owner.getDocumentType());
this.ownerDocType=owner;
@@ -161,30 +160,29 @@ public class SDField extends Field implements TypedKey, FieldOperationContainer,
}
/**
- Creates a new field.
-
- @param name The name of the field
- @param dataType The datatype of the field
- @param isHeader Whether this is a "header" field or a "content" field
- (true = "header").
- @param owner The owning document (used to check for id collisions)
- @param fieldMatching The matching object to set for the field
- */
- protected SDField(SDDocumentType repo, String name, DataType dataType, boolean isHeader, SDDocumentType owner, Matching fieldMatching, boolean populate, int recursion) {
+ * Creates a new field.
+ *
+ * @param name The name of the field
+ * @param dataType The datatype of the field
+ * @param isHeader Whether this is a "header" field or a "content" field (true = "header").
+ * @param owner The owning document (used to check for id collisions)
+ * @param fieldMatching The matching object to set for the field
+ */
+ protected SDField(SDDocumentType repo, String name, DataType dataType, boolean isHeader, SDDocumentType owner,
+ Matching fieldMatching, boolean populate, int recursion) {
super(name, dataType, isHeader, owner == null ? null : owner.getDocumentType());
this.ownerDocType=owner;
- if (fieldMatching != null) {
+ if (fieldMatching != null)
this.setMatching(fieldMatching);
- }
populate(populate, repo, name, dataType, isHeader, fieldMatching, recursion);
}
/**
- Constructor for <b>header</b> fields
-
- @param name The name of the field
- @param dataType The datatype of the field
- */
+ * Constructor for <b>header</b> fields
+ *
+ * @param name The name of the field
+ * @param dataType The datatype of the field
+ */
public SDField(SDDocumentType repo, String name, DataType dataType) {
this(repo, name,dataType,true, true);
}
@@ -759,6 +757,7 @@ public class SDField extends Field implements TypedKey, FieldOperationContainer,
/**
* A list of query commands
+ *
* @return a list of strings with query commands.
*/
@Override
@@ -783,19 +782,18 @@ public class SDField extends Field implements TypedKey, FieldOperationContainer,
return ownerDocType;
}
- /**
- * Two fields are equal if they have the same name
- * No, they are not.
- */
+ @Override
public boolean equals(Object other) {
if ( ! (other instanceof SDField)) return false;
return super.equals(other);
}
+ @Override
public int hashCode() {
return getName().hashCode();
}
+ @Override
public String toString() {
return "field '" + getName() + "'";
}
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/document/Sorting.java b/config-model/src/main/java/com/yahoo/searchdefinition/document/Sorting.java
index dd65cc27625..7e80b967f17 100644
--- a/config-model/src/main/java/com/yahoo/searchdefinition/document/Sorting.java
+++ b/config-model/src/main/java/com/yahoo/searchdefinition/document/Sorting.java
@@ -7,7 +7,7 @@ import java.io.Serializable;
* A search-time document attribute sort specification(per-document in-memory value).
* This belongs to the attribute or field(implicitt attribute).
*
- * @author baldersheim
+ * @author baldersheim
*/
public final class Sorting implements Cloneable, Serializable {
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java
index 34a2fc7ab0e..60b3cb6987c 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/search/SearchCluster.java
@@ -86,13 +86,13 @@ public abstract class SearchCluster extends AbstractSearchCluster
SummaryConfig.Builder summaryConfigBuilder = new SummaryConfig.Builder();
summaryConfigProducer.getConfig(summaryConfigBuilder);
- SummaryConfig summaryConfig = new SummaryConfig(summaryConfigBuilder);
+ SummaryConfig summaryConfig = summaryConfigBuilder.build();
SummarymapConfig summarymapConfig = null;
if (summarymapConfigProducer != null) {
SummarymapConfig.Builder summarymapConfigBuilder = new SummarymapConfig.Builder();
summarymapConfigProducer.getConfig(summarymapConfigBuilder);
- summarymapConfig = new SummarymapConfig(summarymapConfigBuilder);
+ summarymapConfig = summarymapConfigBuilder.build();
}
for (SummaryConfig.Classes sclass : summaryConfig.classes()) {
diff --git a/config-model/src/main/javacc/SDParser.jj b/config-model/src/main/javacc/SDParser.jj
index 31f81b76ea4..e50cbabeb9f 100644
--- a/config-model/src/main/javacc/SDParser.jj
+++ b/config-model/src/main/javacc/SDParser.jj
@@ -828,14 +828,13 @@ SDDocumentType structDefinition(Search search, SDDocumentType repo) :
*/
DataType dataType() :
{
- String typeName=null;
+ String typeName = null;
boolean isArrayOldStyle = false;
- DataType mapType=null;
- DataType arrayType=null;
- DataType wsetType=null;
+ DataType mapType = null;
+ DataType arrayType = null;
+ DataType wsetType = null;
TensorType tensorType;
TemporaryStructuredDataType referenceType;
-
}
{
( LOOKAHEAD(<ARRAY> <LESSTHAN>) ( <ARRAY> <LESSTHAN> arrayType = dataType() <GREATERTHAN> { return DataType.getArray(arrayType); } )
@@ -849,10 +848,9 @@ DataType dataType() :
{
DataType type = VespaDocumentType.INSTANCE.getDataType(typeName);
- //is type still null?
if (type == null) {
- //we are basically creating TemporaryStructDataType instances for ANYTHING here!!
- //we must do this and clean them up later.
+ // we are basically creating TemporaryStructDataType instances for ANYTHING here!!
+ // we must do this and clean them up later.
type = TemporaryStructuredDataType.create(typeName);
}
diff --git a/config-model/src/test/derived/types/attributes.cfg b/config-model/src/test/derived/types/attributes.cfg
index cf3fcebfbcd..e6ffc37e871 100644
--- a/config-model/src/test/derived/types/attributes.cfg
+++ b/config-model/src/test/derived/types/attributes.cfg
@@ -40,6 +40,48 @@ attribute[].upperbound 9223372036854775807
attribute[].densepostinglistthreshold 0.4
attribute[].tensortype ""
attribute[].imported false
+attribute[].name "abool"
+attribute[].datatype BOOL
+attribute[].collectiontype SINGLE
+attribute[].removeifzero false
+attribute[].createifnonexistent false
+attribute[].fastsearch false
+attribute[].huge false
+attribute[].ismutable false
+attribute[].sortascending true
+attribute[].sortfunction UCA
+attribute[].sortstrength PRIMARY
+attribute[].sortlocale ""
+attribute[].enablebitvectors false
+attribute[].enableonlybitvector false
+attribute[].fastaccess false
+attribute[].arity 8
+attribute[].lowerbound -9223372036854775808
+attribute[].upperbound 9223372036854775807
+attribute[].densepostinglistthreshold 0.4
+attribute[].tensortype ""
+attribute[].imported false
+attribute[].name "ashortfloat"
+attribute[].datatype FLOAT16
+attribute[].collectiontype SINGLE
+attribute[].removeifzero false
+attribute[].createifnonexistent false
+attribute[].fastsearch false
+attribute[].huge false
+attribute[].ismutable false
+attribute[].sortascending true
+attribute[].sortfunction UCA
+attribute[].sortstrength PRIMARY
+attribute[].sortlocale ""
+attribute[].enablebitvectors false
+attribute[].enableonlybitvector false
+attribute[].fastaccess false
+attribute[].arity 8
+attribute[].lowerbound -9223372036854775808
+attribute[].upperbound 9223372036854775807
+attribute[].densepostinglistthreshold 0.4
+attribute[].tensortype ""
+attribute[].imported false
attribute[].name "arrayfield"
attribute[].datatype INT32
attribute[].collectiontype ARRAY
diff --git a/config-model/src/test/derived/types/documentmanager.cfg b/config-model/src/test/derived/types/documentmanager.cfg
index 647c26e1316..0644659cae7 100644
--- a/config-model/src/test/derived/types/documentmanager.cfg
+++ b/config-model/src/test/derived/types/documentmanager.cfg
@@ -131,6 +131,12 @@ datatype[].structtype[].field[].detailedtype ""
datatype[].structtype[].field[].name "along"
datatype[].structtype[].field[].datatype 4
datatype[].structtype[].field[].detailedtype ""
+datatype[].structtype[].field[].name "abool"
+datatype[].structtype[].field[].datatype 6
+datatype[].structtype[].field[].detailedtype ""
+datatype[].structtype[].field[].name "ashortfloat"
+datatype[].structtype[].field[].datatype 7
+datatype[].structtype[].field[].detailedtype ""
datatype[].structtype[].field[].name "arrayfield"
datatype[].structtype[].field[].datatype -1245117006
datatype[].structtype[].field[].detailedtype ""
@@ -232,6 +238,7 @@ datatype[].documenttype[].inherits[].version 0
datatype[].documenttype[].headerstruct 1328581348
datatype[].documenttype[].bodystruct 348447225
datatype[].documenttype[].fieldsets{[document]}.fields[] "Folders"
+datatype[].documenttype[].fieldsets{[document]}.fields[] "abool"
datatype[].documenttype[].fieldsets{[document]}.fields[] "abyte"
datatype[].documenttype[].fieldsets{[document]}.fields[] "album0"
datatype[].documenttype[].fieldsets{[document]}.fields[] "album1"
@@ -239,6 +246,7 @@ datatype[].documenttype[].fieldsets{[document]}.fields[] "along"
datatype[].documenttype[].fieldsets{[document]}.fields[] "arrarr"
datatype[].documenttype[].fieldsets{[document]}.fields[] "arrayfield"
datatype[].documenttype[].fieldsets{[document]}.fields[] "arraymapfield"
+datatype[].documenttype[].fieldsets{[document]}.fields[] "ashortfloat"
datatype[].documenttype[].fieldsets{[document]}.fields[] "complexarray"
datatype[].documenttype[].fieldsets{[document]}.fields[] "doublemapfield"
datatype[].documenttype[].fieldsets{[document]}.fields[] "floatmapfield"
diff --git a/config-model/src/test/derived/types/ilscripts.cfg b/config-model/src/test/derived/types/ilscripts.cfg
index 92ca728cea7..3bcdd16e3d6 100644
--- a/config-model/src/test/derived/types/ilscripts.cfg
+++ b/config-model/src/test/derived/types/ilscripts.cfg
@@ -3,6 +3,8 @@ fieldmatchmaxlength 1000000
ilscript[].doctype "types"
ilscript[].docfield[] "abyte"
ilscript[].docfield[] "along"
+ilscript[].docfield[] "abool"
+ilscript[].docfield[] "ashortfloat"
ilscript[].docfield[] "arrayfield"
ilscript[].docfield[] "setfield"
ilscript[].docfield[] "setfield2"
@@ -30,6 +32,8 @@ ilscript[].docfield[] "complexarray"
ilscript[].content[] "clear_state | guard { input along | attribute other; }"
ilscript[].content[] "clear_state | guard { input abyte | summary abyte | attribute abyte; }"
ilscript[].content[] "clear_state | guard { input along | summary along | attribute along; }"
+ilscript[].content[] "clear_state | guard { input abool | summary abool | attribute abool; }"
+ilscript[].content[] "clear_state | guard { input ashortfloat | summary ashortfloat | attribute ashortfloat; }"
ilscript[].content[] "clear_state | guard { input arrayfield | attribute arrayfield; }"
ilscript[].content[] "clear_state | guard { input setfield | attribute setfield; }"
ilscript[].content[] "clear_state | guard { input setfield2 | attribute setfield2; }"
diff --git a/config-model/src/test/derived/types/index-info.cfg b/config-model/src/test/derived/types/index-info.cfg
index 32375dc09f4..576a95de06f 100644
--- a/config-model/src/test/derived/types/index-info.cfg
+++ b/config-model/src/test/derived/types/index-info.cfg
@@ -15,6 +15,18 @@ indexinfo[].command[].indexname "along"
indexinfo[].command[].command "attribute"
indexinfo[].command[].indexname "along"
indexinfo[].command[].command "numerical"
+indexinfo[].command[].indexname "abool"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "abool"
+indexinfo[].command[].command "attribute"
+indexinfo[].command[].indexname "abool"
+indexinfo[].command[].command "word"
+indexinfo[].command[].indexname "ashortfloat"
+indexinfo[].command[].command "index"
+indexinfo[].command[].indexname "ashortfloat"
+indexinfo[].command[].command "attribute"
+indexinfo[].command[].indexname "ashortfloat"
+indexinfo[].command[].command "numerical"
indexinfo[].command[].indexname "arrayfield"
indexinfo[].command[].command "index"
indexinfo[].command[].indexname "arrayfield"
diff --git a/config-model/src/test/derived/types/summary.cfg b/config-model/src/test/derived/types/summary.cfg
index 3a73185b325..e5485a24c8c 100644
--- a/config-model/src/test/derived/types/summary.cfg
+++ b/config-model/src/test/derived/types/summary.cfg
@@ -1,10 +1,14 @@
-defaultsummaryid 1103008471
-classes[].id 1103008471
+defaultsummaryid 1131946680
+classes[].id 1131946680
classes[].name "default"
classes[].fields[].name "abyte"
classes[].fields[].type "byte"
classes[].fields[].name "along"
classes[].fields[].type "int64"
+classes[].fields[].name "abool"
+classes[].fields[].type "bool"
+classes[].fields[].name "ashortfloat"
+classes[].fields[].type "float16"
classes[].fields[].name "tagfield"
classes[].fields[].type "jsonstring"
classes[].fields[].name "stringmapfield"
@@ -19,7 +23,7 @@ classes[].fields[].name "summaryfeatures"
classes[].fields[].type "featuredata"
classes[].fields[].name "documentid"
classes[].fields[].type "longstring"
-classes[].id 278794929
+classes[].id 1027812395
classes[].name "attributeprefetch"
classes[].fields[].name "other"
classes[].fields[].type "int64"
@@ -27,6 +31,10 @@ classes[].fields[].name "abyte"
classes[].fields[].type "byte"
classes[].fields[].name "along"
classes[].fields[].type "int64"
+classes[].fields[].name "abool"
+classes[].fields[].type "bool"
+classes[].fields[].name "ashortfloat"
+classes[].fields[].type "float16"
classes[].fields[].name "juletre"
classes[].fields[].type "int64"
classes[].fields[].name "rankfeatures"
diff --git a/config-model/src/test/derived/types/summarymap.cfg b/config-model/src/test/derived/types/summarymap.cfg
index 0cb8b6129fa..b87200f6573 100644
--- a/config-model/src/test/derived/types/summarymap.cfg
+++ b/config-model/src/test/derived/types/summarymap.cfg
@@ -5,6 +5,12 @@ override[].arguments "abyte"
override[].field "along"
override[].command "attribute"
override[].arguments "along"
+override[].field "abool"
+override[].command "attribute"
+override[].arguments "abool"
+override[].field "ashortfloat"
+override[].command "attribute"
+override[].arguments "ashortfloat"
override[].field "tagfield"
override[].command "attribute"
override[].arguments "tagfield"
diff --git a/config-model/src/test/derived/types/types.sd b/config-model/src/test/derived/types/types.sd
index c908b648340..839cb08dbd6 100644
--- a/config-model/src/test/derived/types/types.sd
+++ b/config-model/src/test/derived/types/types.sd
@@ -11,6 +11,14 @@ search types {
indexing: index | summary | attribute
}
+ field abool type bool {
+ indexing: summary | attribute
+ }
+
+ field ashortfloat type float16 {
+ indexing: summary | attribute
+ }
+
field arrayfield type array<int> {
indexing: attribute
}
diff --git a/config-model/src/test/derived/types/vsmsummary.cfg b/config-model/src/test/derived/types/vsmsummary.cfg
index b1a29b94491..5ee589ccf9f 100644
--- a/config-model/src/test/derived/types/vsmsummary.cfg
+++ b/config-model/src/test/derived/types/vsmsummary.cfg
@@ -5,6 +5,12 @@ fieldmap[].command NONE
fieldmap[].summary "along"
fieldmap[].document[].field "along"
fieldmap[].command NONE
+fieldmap[].summary "abool"
+fieldmap[].document[].field "abool"
+fieldmap[].command NONE
+fieldmap[].summary "ashortfloat"
+fieldmap[].document[].field "ashortfloat"
+fieldmap[].command NONE
fieldmap[].summary "tagfield"
fieldmap[].document[].field "tagfield"
fieldmap[].command NONE