TextField¶
- class pyatlan.model.fields.atlan_fields.TextField(atlan_field_name: StrictStr, text_field_name: StrictStr)[source]¶
Represents any field in Atlan that can only be searched using text-related search operations.
- bucket_by(size: int = 10, include_source_value: bool = False, nested: Dict[Any, Aggregation] | None = None, order: List[Dict[str, SortOrder]] | None = None) Aggregation¶
Return criteria to bucket results based on the provided field.
- Parameters:
size – the number of buckets to include results across, defaults to 10.
include_source_value – whether to include the source value (True) or not (False)
nested – (optional) nested aggregations to include.
order – (optional) the order for the buckets.
- Returns:
criteria to bucket results by the provided field,
across a maximum number of buckets defined by the provided size.
- has_any_value(field_type: AtlanSearchableFieldType | None = None) Query¶
Returns a query that will only match assets that have some non-null, non-empty value (no matter what actual value) for the field.
Note: When text exceeds a particular length (5K characters), the keyword field on an attribute can be empty while the text field on the same attribute is populated. For KeywordTextField types, use field_type=AtlanSearchableFieldType.TEXT to check the text field instead. For other field types, this parameter is ignored.
- Parameters:
field_type – optional field type to check for existence (KEYWORD or TEXT). Only applicable for KeywordTextField types. Defaults to KEYWORD (None) for backwards compatibility.
- Returns:
a query that will only match assets that have some non-null, non-empty value for the field
- property in_lineage: LineageFilterFieldString¶
Returns a proxy which can be used a lineage filter with the appropriate subset of conditions
- match(value: StrictStr) Query[source]¶
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).
- 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)
- match_phrase(value: StrictStr) Query[source]¶
Returns a query that will textually match the specified phrase within the field, ensuring that the words appear in the exact order provided. This analyzes the provided value according to the same analysis carried out on the field (for example, tokenization, stemming, and so on).
- 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)
- order(order: SortOrder = SortOrder.ASCENDING) SortItem¶
Returns a condition to sort results by the field, in the specified order.
- Parameters:
order – in which to sort the results
- Returns:
sort condition for the field, in the specified order