Class SearchFuzzyValueBuilder
- All Implemented Interfaces:
Builder<SearchFuzzyValue>
Example to create an instance using the builder pattern
SearchFuzzyValue searchFuzzyValue = SearchFuzzyValue.builder()
.field("{field}")
.level(0.3)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionset the value to the boostbuild()builds SearchFuzzyValue with checking for non-null required valuesbuilds SearchFuzzyValue without checking for non-null required valuesset the value to the fieldfieldType(SearchFieldType fieldType) Possible values for thefieldTypeproperty on simple expressions indicating the data type of thefield.getBoost()value of boost}getField()value of field}Possible values for thefieldTypeproperty on simple expressions indicating the data type of thefield.Language of the localized value.getLevel()The maximum fuzziness level desired for the search term.Controls whether all of the provided terms must match (all, default) or any of those (any).getValue()The search term to find fuzzy matches for.Language of the localized value.The maximum fuzziness level desired for the search term.mustMatch(SearchMatchType mustMatch) Controls whether all of the provided terms must match (all, default) or any of those (any).static SearchFuzzyValueBuilderof()factory method for an instance of SearchFuzzyValueBuilderstatic SearchFuzzyValueBuilderof(SearchFuzzyValue template) create builder for SearchFuzzyValue instanceThe search term to find fuzzy matches for.
-
Constructor Details
-
SearchFuzzyValueBuilder
public SearchFuzzyValueBuilder()
-
-
Method Details
-
field
set the value to the field- Parameters:
field- value to be set- Returns:
- Builder
-
boost
set the value to the boost- Parameters:
boost- value to be set- Returns:
- Builder
-
fieldType
Possible values for the
fieldTypeproperty on simple expressions indicating the data type of thefield.- Parameters:
fieldType- value to be set- Returns:
- Builder
-
value
The search term to find fuzzy matches for. If multiple terms are provided (separated by whitespace), the fuzziness level is applied to each term individually.
- Parameters:
value- value to be set- Returns:
- Builder
-
level
The maximum fuzziness level desired for the search term. Allowed values are
0,1, and2. The API automatically adjusts the effective fuzziness level based on the length of the search term if it exceeds the maximum allowed for the given string length according to the following rules:- Terms with 1-2 characters: 0 (exact match)
- Terms with 3-5 characters: 1 (up to one difference is allowed)
- Terms with more than 5 characters: 2 (up to two differences are allowed)
- Parameters:
level- value to be set- Returns:
- Builder
-
language
Language of the localized value. Must be provided when the field is of type
localizedTextField. The provided Locale must be one of the Project's languages.- Parameters:
language- value to be set- Returns:
- Builder
-
mustMatch
Controls whether all of the provided terms must match (
all, default) or any of those (any).- Parameters:
mustMatch- value to be set- Returns:
- Builder
-
getField
value of field}- Returns:
- field
-
getBoost
value of boost}- Returns:
- boost
-
getFieldType
Possible values for the
fieldTypeproperty on simple expressions indicating the data type of thefield.- Returns:
- fieldType
-
getValue
The search term to find fuzzy matches for. If multiple terms are provided (separated by whitespace), the fuzziness level is applied to each term individually.
- Returns:
- value
-
getLevel
The maximum fuzziness level desired for the search term. Allowed values are
0,1, and2. The API automatically adjusts the effective fuzziness level based on the length of the search term if it exceeds the maximum allowed for the given string length according to the following rules:- Terms with 1-2 characters: 0 (exact match)
- Terms with 3-5 characters: 1 (up to one difference is allowed)
- Terms with more than 5 characters: 2 (up to two differences are allowed)
- Returns:
- level
-
getLanguage
Language of the localized value. Must be provided when the field is of type
localizedTextField. The provided Locale must be one of the Project's languages.- Returns:
- language
-
getMustMatch
Controls whether all of the provided terms must match (
all, default) or any of those (any).- Returns:
- mustMatch
-
build
builds SearchFuzzyValue with checking for non-null required values- Specified by:
buildin interfaceBuilder<SearchFuzzyValue>- Returns:
- SearchFuzzyValue
-
buildUnchecked
builds SearchFuzzyValue without checking for non-null required values- Returns:
- SearchFuzzyValue
-
of
factory method for an instance of SearchFuzzyValueBuilder- Returns:
- builder
-
of
create builder for SearchFuzzyValue instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-