Package com.atlan.model.fields
Class KeywordTextField
java.lang.Object
com.atlan.model.fields.AtlanField
com.atlan.model.fields.SearchableField
com.atlan.model.fields.KeywordTextField
- All Implemented Interfaces:
IKeywordSearchable
,ISearchable
,ITextSearchable
- Direct Known Subclasses:
InternalKeywordTextField
public class KeywordTextField
extends SearchableField
implements IKeywordSearchable, ITextSearchable
Represents any field in Atlan that can be searched by keyword or text-based search operations.
-
Field Summary
Fields inherited from interface com.atlan.model.fields.ISearchable
EMBEDDED_SOURCE_VALUE
-
Constructor Summary
ConstructorDescriptionKeywordTextField
(String atlan, String keyword, String text) Default constructor. -
Method Summary
Modifier and TypeMethodDescriptionco.elastic.clients.elasticsearch._types.query_dsl.Query
Returns a query that will match all assets whose provided field has a value that exactly equals the provided enumerated value.co.elastic.clients.elasticsearch._types.query_dsl.Query
Returns a query that will match all assets whose provided field has a value that exactly equals the provided string value.Returns the name of the keyword field index for this attribute in Elastic.Returns the name of the text field index for this attribute in Elastic.co.elastic.clients.elasticsearch._types.query_dsl.Query
in
(Collection<String> values) Returns a query that will match all assets whose provided field has a value that exactly equals at least one of the provided string values.co.elastic.clients.elasticsearch._types.query_dsl.Query
Returns a query that will match all assets whose provided field has multiple values that exactly equal a specified number of the provided string values.co.elastic.clients.elasticsearch._types.query_dsl.Query
Returns a query that will textually match the provided value against the field.co.elastic.clients.elasticsearch._types.query_dsl.Query
regex
(String regexp, Collection<ElasticRegexOperator> flags, boolean caseInsensitive) Returns a query that will match all assets whose provided field has a value that matches the regular expression provided.co.elastic.clients.elasticsearch._types.query_dsl.Query
startsWith
(String value, boolean caseInsensitive) Returns a query that will match all assets whose provided field has a value that starts with the provided value.co.elastic.clients.elasticsearch._types.query_dsl.Query
Returns a query that will match all assets whose provided field has a value that matches the wildcard expression provided.Methods inherited from class com.atlan.model.fields.SearchableField
bucketBy, bucketBy, count, distinct, distinct, getElasticFieldName, hasAnyValue, order
Methods inherited from class com.atlan.model.fields.AtlanField
getAtlanFieldName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.atlan.model.fields.IKeywordSearchable
eq, regex, regex, startsWith, wildcard
Methods inherited from interface com.atlan.model.fields.ISearchable
bucketBy, bucketBy
-
Field Details
-
inLineage
-
-
Constructor Details
-
KeywordTextField
Default constructor.- Parameters:
atlan
- name of the attribute in the metastorekeyword
- name of the keyword field in the search indextext
- name of the text field in the search index
-
-
Method Details
-
getKeywordFieldName
Returns the name of the keyword field index for this attribute in Elastic.- Specified by:
getKeywordFieldName
in interfaceIKeywordSearchable
- Returns:
- the field name for the keyword index on this attribute
-
getTextFieldName
Returns the name of the text field index for this attribute in Elastic.- Specified by:
getTextFieldName
in interfaceITextSearchable
- Returns:
- the field name for the text index on this attribute
-
startsWith
public co.elastic.clients.elasticsearch._types.query_dsl.Query startsWith(String value, boolean caseInsensitive) Returns a query that will match all assets whose provided field has a value that starts with the provided value. Note that this can also be a case-insensitive match.- Specified by:
startsWith
in interfaceIKeywordSearchable
- Parameters:
value
- the value (prefix) to check the field's value starts withcaseInsensitive
- if true will match the value irrespective of case, otherwise will be a case-sensitive match- Returns:
- a query that will only match assets whose value for the field starts with the value provided
-
eq
Returns a query that will match all assets whose provided field has a value that exactly equals the provided enumerated value.- Specified by:
eq
in interfaceIKeywordSearchable
- Parameters:
value
- the value (enumerated) to check the field's value is exactly equal to- Returns:
- a query that will only match assets whose value for the field is exactly equal to the enumerated value provided
-
eq
public co.elastic.clients.elasticsearch._types.query_dsl.Query eq(String value, boolean caseInsensitive) Returns a query that will match all assets whose provided field has a value that exactly equals the provided string value. Note that this can also be modified to ignore case when doing the exact match.- Specified by:
eq
in interfaceIKeywordSearchable
- Parameters:
value
- the value (string) to check the field's value is exactly equal tocaseInsensitive
- if true will match the value irrespective of case, otherwise will be a case-sensitive match- Returns:
- a query that will only match assets whose value for the field is exactly equal to the string value provided (optionally case-insensitive)
-
in
Returns a query that will match all assets whose provided field has a value that exactly equals at least one of the provided string values.- Specified by:
in
in interfaceIKeywordSearchable
- Parameters:
values
- the values (strings) to check the field's value is exactly equal to- Returns:
- a query that will only match assets whose value for the field is exactly equal to at least one of the string values provided
-
in
public co.elastic.clients.elasticsearch._types.query_dsl.Query in(List<String> values, int minMustMatch) Returns a query that will match all assets whose provided field has multiple values that exactly equal a specified number of the provided string values.- Specified by:
in
in interfaceIKeywordSearchable
- Parameters:
values
- the values (strings) to check the field's values are exactly equal tominMustMatch
- minimum number of values from the provided list that must be contained in the field's values- Returns:
- a query that will only match assets whose values for the field are exactly equal to a minimal number of the string values provided
-
wildcard
public co.elastic.clients.elasticsearch._types.query_dsl.Query wildcard(String value, boolean caseInsensitive) Returns a query that will match all assets whose provided field has a value that matches the wildcard expression provided. This is similar to regex matching, but only allows * (match zero or more characters) and ? (match any single character) operators.- Specified by:
wildcard
in interfaceIKeywordSearchable
- Parameters:
value
- the value (containing either * or ?) to match against the field's valuescaseInsensitive
- if true will match the value irrespective of case, otherwise will be a case-sensitive match- Returns:
- a query that will only match assets whose value for the field matches the wildcard expression provided
-
regex
public co.elastic.clients.elasticsearch._types.query_dsl.Query regex(String regexp, Collection<ElasticRegexOperator> flags, boolean caseInsensitive) Returns a query that will match all assets whose provided field has a value that matches the regular expression provided.- Specified by:
regex
in interfaceIKeywordSearchable
- Parameters:
regexp
- regular expression to match values againstflags
- optional set of operators to enable in the regular expression enginecaseInsensitive
- if true will match the value irrespective of case, otherwise will be a case-sensitive match- Returns:
- a query that will only match assets whose value for the field matches the regular expression provided
-
match
Returns a query that will textually match the provided value against the field. This analyzes the provided value according to the same analysis carried out on the field (for example, tokenization, stemming, and so on).- Specified by:
match
in interfaceITextSearchable
- Parameters:
value
- the string value to match against- Returns:
- a query that will only match assets whose analyzed value for the field matches the value provided (which will also be analyzed)
-