SimilarFilterClause

SimilarFilterClause(value_param, weight_param, field_set)

Parameters

value_param
TypedParam | Evaluated[TypedParam]
required
The parameter that specifies the similarity value to filter by.
weight_param
TypedParam | Evaluated[TypedParam]
required
The parameter that specifies the weight for this filter.
field_set
SpaceFieldSet
required
The space field set that defines the fields for similarity comparison.

Inheritance

Inheritance Chain:
  • SimilarFilterClause
  • SingleValueParamQueryClause
  • QueryClause
  • NLQCompatible
  • ABC

Properties

annotation_by_space_annotation
dict[str, str]
Mapping of space annotations to their corresponding annotations.
field_set
SpaceFieldSet
The space field set used for similarity comparison.
nlq_annotations
list[NLQAnnotation]
List of natural language query annotations for this clause.
weight_param
TypedParam | Evaluated[TypedParam]
The weight parameter for this similarity filter.

Static Methods

from_param()

from_param(spaces, field_set, param, weight) -> SimilarFilterClause
spaces
Sequence[Space]
required
The spaces to apply the similarity filter to.
field_set
SpaceFieldSet
required
The field set for similarity comparison.
param
ParamType
required
The parameter defining the similarity value.
weight
NumericParamType
required
The weight parameter for the filter.
Returns: SimilarFilterClause - A new similar filter clause instance.