Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public final class FieldBuilder {
private static final int MAX_DEPTH = 10000;
private static final Map<Type, SearchFieldDataType> SUPPORTED_NONE_PARAMETERIZED_TYPE = new HashMap<>();
private static final Set<Type> UNSUPPORTED_TYPES = new HashSet<>();
private static final Set<SearchFieldDataType> UNSUPPORTED_SERVICE_TYPES = new HashSet<>();

private static final SearchFieldDataType COLLECTION_STRING
= SearchFieldDataType.collection(SearchFieldDataType.STRING);
Expand Down Expand Up @@ -83,6 +84,7 @@ public final class FieldBuilder {
SUPPORTED_NONE_PARAMETERIZED_TYPE.put(Byte.class, SearchFieldDataType.SBYTE);
SUPPORTED_NONE_PARAMETERIZED_TYPE.put(short.class, SearchFieldDataType.INT16);
SUPPORTED_NONE_PARAMETERIZED_TYPE.put(Short.class, SearchFieldDataType.INT16);
UNSUPPORTED_SERVICE_TYPES.add(SearchFieldDataType.BYTE);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public SearchServiceLimits() {

/**
* Get the maxFieldsPerIndex property: The maximum allowed fields per index.
*
*
* @return the maxFieldsPerIndex value.
*/
public Integer getMaxFieldsPerIndex() {
Expand All @@ -61,7 +61,7 @@ public Integer getMaxFieldsPerIndex() {

/**
* Set the maxFieldsPerIndex property: The maximum allowed fields per index.
*
*
* @param maxFieldsPerIndex the maxFieldsPerIndex value to set.
* @return the SearchServiceLimits object itself.
*/
Expand All @@ -73,7 +73,7 @@ public SearchServiceLimits setMaxFieldsPerIndex(Integer maxFieldsPerIndex) {
/**
* Get the maxFieldNestingDepthPerIndex property: The maximum depth which you can nest sub-fields in an index,
* including the top-level complex field. For example, a/b/c has a nesting depth of 3.
*
*
* @return the maxFieldNestingDepthPerIndex value.
*/
public Integer getMaxFieldNestingDepthPerIndex() {
Expand All @@ -83,7 +83,7 @@ public Integer getMaxFieldNestingDepthPerIndex() {
/**
* Set the maxFieldNestingDepthPerIndex property: The maximum depth which you can nest sub-fields in an index,
* including the top-level complex field. For example, a/b/c has a nesting depth of 3.
*
*
* @param maxFieldNestingDepthPerIndex the maxFieldNestingDepthPerIndex value to set.
* @return the SearchServiceLimits object itself.
*/
Expand All @@ -95,7 +95,7 @@ public SearchServiceLimits setMaxFieldNestingDepthPerIndex(Integer maxFieldNesti
/**
* Get the maxComplexCollectionFieldsPerIndex property: The maximum number of fields of type
* Collection(Edm.ComplexType) allowed in an index.
*
*
* @return the maxComplexCollectionFieldsPerIndex value.
*/
public Integer getMaxComplexCollectionFieldsPerIndex() {
Expand All @@ -105,7 +105,7 @@ public Integer getMaxComplexCollectionFieldsPerIndex() {
/**
* Set the maxComplexCollectionFieldsPerIndex property: The maximum number of fields of type
* Collection(Edm.ComplexType) allowed in an index.
*
*
* @param maxComplexCollectionFieldsPerIndex the maxComplexCollectionFieldsPerIndex value to set.
* @return the SearchServiceLimits object itself.
*/
Expand All @@ -117,7 +117,7 @@ public SearchServiceLimits setMaxComplexCollectionFieldsPerIndex(Integer maxComp
/**
* Get the maxComplexObjectsInCollectionsPerDocument property: The maximum number of objects in complex collections
* allowed per document.
*
*
* @return the maxComplexObjectsInCollectionsPerDocument value.
*/
public Integer getMaxComplexObjectsInCollectionsPerDocument() {
Expand All @@ -127,7 +127,7 @@ public Integer getMaxComplexObjectsInCollectionsPerDocument() {
/**
* Set the maxComplexObjectsInCollectionsPerDocument property: The maximum number of objects in complex collections
* allowed per document.
*
*
* @param maxComplexObjectsInCollectionsPerDocument the maxComplexObjectsInCollectionsPerDocument value to set.
* @return the SearchServiceLimits object itself.
*/
Expand All @@ -139,7 +139,7 @@ public Integer getMaxComplexObjectsInCollectionsPerDocument() {

/**
* Get the maxStoragePerIndexInBytes property: The maximum amount of storage in bytes allowed per index.
*
*
* @return the maxStoragePerIndexInBytes value.
*/
public Long getMaxStoragePerIndexInBytes() {
Expand All @@ -148,7 +148,7 @@ public Long getMaxStoragePerIndexInBytes() {

/**
* Set the maxStoragePerIndexInBytes property: The maximum amount of storage in bytes allowed per index.
*
*
* @param maxStoragePerIndexInBytes the maxStoragePerIndexInBytes value to set.
* @return the SearchServiceLimits object itself.
*/
Expand All @@ -171,7 +171,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {

/**
* Reads an instance of SearchServiceLimits from the JsonReader.
*
*
* @param jsonReader The JsonReader being read.
* @return An instance of SearchServiceLimits if the JsonReader was pointing to an instance of it, or null if it was
* pointing to JSON null.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class VectorSearchVectorizer implements JsonSerializable<VectorSearchVect

/**
* Creates an instance of VectorSearchVectorizer class.
*
*
* @param name the name value to set.
*/
public VectorSearchVectorizer(String name) {
Expand All @@ -34,7 +34,7 @@ public VectorSearchVectorizer(String name) {

/**
* Get the name property: The name to associate with this particular vectorization method.
*
*
* @return the name value.
*/
public String getName() {
Expand All @@ -50,7 +50,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {

/**
* Reads an instance of VectorSearchVectorizer from the JsonReader.
*
*
* @param jsonReader The JsonReader being read.
* @return An instance of VectorSearchVectorizer if the JsonReader was pointing to an instance of it, or null if it
* was pointing to JSON null.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import java.time.OffsetDateTime;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
Expand Down Expand Up @@ -126,7 +127,7 @@ public void ignoredPropertyName() {
public void supportedFields() {
List<SearchField> fields = SearchIndexClient.buildSearchFields(AllSupportedFields.class, null);

assertEquals(23, fields.size());
assertEquals(25, fields.size());

Map<String, SearchFieldDataType> fieldToDataType = fields.stream()
.collect(Collectors.toMap(SearchField::getName, SearchField::getType));
Expand Down Expand Up @@ -154,6 +155,9 @@ public void supportedFields() {
assertEquals(SearchFieldDataType.INT16, fieldToDataType.get("primitiveShort"));
assertEquals(SearchFieldDataType.SBYTE, fieldToDataType.get("nullableByte"));
assertEquals(SearchFieldDataType.SBYTE, fieldToDataType.get("primitiveByte"));
assertEquals(SearchFieldDataType.collection(SearchFieldDataType.SBYTE), fieldToDataType.get("byteArray"));
assertEquals(SearchFieldDataType.collection(SearchFieldDataType.SBYTE), fieldToDataType.get("byteList"));

}

@SuppressWarnings({"unused", "UseOfObsoleteDateTimeApi"})
Expand Down Expand Up @@ -296,6 +300,18 @@ public byte getPrimitiveByte() {
public Byte getNullableByte() {
return nullableByte;
}

// 24. name = 'byteArray', OData type = COMPLEX
private byte[] byteArray;
public byte[] getByteArray() {
return byteArray;
}

// 25. name = 'byteList', OData type = COMPLEX
private List<Byte> byteList;
public List<Byte> getByteList() {
return byteList;
}
}
@Test
public void validNormalizerField() {
Expand Down