Share via


FieldBuilderOptions Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.FieldBuilderOptions

public final class FieldBuilderOptions

Additional parameters to build SearchField.

Constructor Summary

Constructor Description
FieldBuilderOptions()

Creates an instance of FieldBuilderOptions.

Method Summary

Modifier and Type Method and Description
JsonSerializer getJsonSerializer()

Gets the serializer used to aid the construction of SearchField in buildSearchFields(Class<?> model, FieldBuilderOptions options) buildSearchFields} or buildSearchFields(Class<?> model, FieldBuilderOptions options).

FieldBuilderOptions setJsonSerializer(JsonSerializer jsonSerializer)

Sets the serializer.

Methods inherited from java.lang.Object

Constructor Details

FieldBuilderOptions

public FieldBuilderOptions()

Creates an instance of FieldBuilderOptions.

Method Details

getJsonSerializer

public JsonSerializer getJsonSerializer()

Gets the serializer used to aid the construction of SearchField in buildSearchFields(Class<?> model, FieldBuilderOptions options) buildSearchFields} or buildSearchFields(Class<?> model, FieldBuilderOptions options).

If JsonSerializer is null or doesn't implement the MemberNameConverter interface then MemberNameConverterProviders#createInstance() will be used to provide a converter from the classpath.

Returns:

The custom JsonSerializer.

setJsonSerializer

public FieldBuilderOptions setJsonSerializer(JsonSerializer jsonSerializer)

Sets the serializer.

For building SearchField it is expected that the JsonSerializer passed also implements the MemberNameConverter interface. If it doesn't MemberNameConverterProviders#createInstance() will be used to provide a converter from the classpath.

Parameters:

jsonSerializer - The custom serializer.

Returns:

The updated FieldBuilderOptions object.

Applies to