Class SuggestOptions
java.lang.Object
com.azure.analytics.purview.datamap.models.SuggestOptions
- All Implemented Interfaces:
com.azure.json.JsonSerializable<SuggestOptions>
public final class SuggestOptions
extends Object
implements com.azure.json.JsonSerializable<SuggestOptions>
The payload of suggest request.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SuggestOptionsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of SuggestOptions from the JsonReader.com.azure.core.util.BinaryDataGet the filter property: The filter for the search.Get the keywords property: The keywords applied to all fields that support suggest operation.getLimit()Get the limit property: The number of suggestions we hope to return.setFilter(com.azure.core.util.BinaryData filter) Set the filter property: The filter for the search.setKeywords(String keywords) Set the keywords property: The keywords applied to all fields that support suggest operation.Set the limit property: The number of suggestions we hope to return.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
SuggestOptions
public SuggestOptions()Creates an instance of SuggestOptions class.
-
-
Method Details
-
getKeywords
Get the keywords property: The keywords applied to all fields that support suggest operation. It must be at least 1 character, and no more than 100 characters. In the index schema we defined a default suggester which lists all the supported fields and specifies a search mode.- Returns:
- the keywords value.
-
setKeywords
Set the keywords property: The keywords applied to all fields that support suggest operation. It must be at least 1 character, and no more than 100 characters. In the index schema we defined a default suggester which lists all the supported fields and specifies a search mode.- Parameters:
keywords- the keywords value to set.- Returns:
- the SuggestOptions object itself.
-
getLimit
Get the limit property: The number of suggestions we hope to return. The default value is 5. The value must be a number between 1 and 100.- Returns:
- the limit value.
-
setLimit
Set the limit property: The number of suggestions we hope to return. The default value is 5. The value must be a number between 1 and 100.- Parameters:
limit- the limit value to set.- Returns:
- the SuggestOptions object itself.
-
getFilter
public com.azure.core.util.BinaryData getFilter()Get the filter property: The filter for the search.- Returns:
- the filter value.
-
setFilter
Set the filter property: The filter for the search.- Parameters:
filter- the filter value to set.- Returns:
- the SuggestOptions object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<SuggestOptions>- Throws:
IOException
-
fromJson
Reads an instance of SuggestOptions from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of SuggestOptions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the SuggestOptions.
-