Class QueryRewrites
java.lang.Object
com.azure.search.documents.models.QueryRewrites
Configuration for how semantic search rewrites a query.
-
Constructor Summary
ConstructorsConstructorDescriptionQueryRewrites(QueryRewritesType rewritesType) Creates a new instance ofQueryRewrites. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic QueryRewritesfromString(String str) Parses aQueryRewritesfrom a string.getCount()Gets the number of rewrites to generate.Gets the type of query rewrites to perform.inthashCode()Sets the number of rewrites to generate.toString()
-
Constructor Details
-
QueryRewrites
Creates a new instance ofQueryRewrites.- Parameters:
rewritesType- The type of query rewrites to perform.- Throws:
NullPointerException- IfrewritesTypeis null.
-
-
Method Details
-
getRewritesType
Gets the type of query rewrites to perform.- Returns:
- The type of query rewrites to perform.
-
getCount
Gets the number of rewrites to generate.The number of rewrites to return is optional and will default to 10.
- Returns:
- The number of rewrites to generate.
-
setCount
Sets the number of rewrites to generate.The number of rewrites to return is optional and will default to 10.
- Parameters:
count- The number of rewrites to generate.- Returns:
- The QueryRewrites object itself.
-
toString
-
hashCode
public int hashCode() -
equals
-
fromString
Parses aQueryRewritesfrom a string.- Parameters:
str- The string to parse.- Returns:
- The parsed
QueryRewrites. - Throws:
IllegalArgumentException- If the string is invalid.
-