Skip to main content

CombinedSearchVector

This class represents a combination of two search vectors using a specific connector and configuration. It inherits from both SearchVectorCombinable and CombinedExpression to facilitate complex full-text search queries. The class manages the left-hand side, right-hand side, and the logical connector used to join them.

Attributes

AttributeTypeDescription
configstringThe search configuration used for text search operations, such as a language or dictionary specification.

Constructor

Signature

def CombinedSearchVector(
lhs: [SearchVectorCombinable](searchvectorcombinable.md?sid=django_contrib_postgres_search_searchvectorcombinable),
connector: str,
rhs: [SearchVectorCombinable](searchvectorcombinable.md?sid=django_contrib_postgres_search_searchvectorcombinable),
config: Any,
output_field: [Field](../../../forms/fields/field.md?sid=django_forms_fields_field) = None
)

Parameters

NameTypeDescription
lhs[SearchVectorCombinable](searchvectorcombinable.md?sid=django_contrib_postgres_search_searchvectorcombinable)The left-hand side search vector expression.
connectorstrThe operator used to combine the search vectors.
rhs[SearchVectorCombinable](searchvectorcombinable.md?sid=django_contrib_postgres_search_searchvectorcombinable)The right-hand side search vector expression.
configAnyThe configuration to be used for the search vector.
output_field[Field](../../../forms/fields/field.md?sid=django_forms_fields_field) = NoneThe output field type for the expression.

Signature

def CombinedSearchVector(
lhs: [SearchVectorCombinable](searchvectorcombinable.md?sid=django_contrib_postgres_search_searchvectorcombinable),
connector: string,
rhs: [SearchVectorCombinable](searchvectorcombinable.md?sid=django_contrib_postgres_search_searchvectorcombinable),
config: string,
output_field: [Field](../../../forms/fields/field.md?sid=django_forms_fields_field) = None
) - > null

Parameters

NameTypeDescription
lhs[SearchVectorCombinable](searchvectorcombinable.md?sid=django_contrib_postgres_search_searchvectorcombinable)The left-hand side expression or search vector to be combined.
connectorstringThe operator used to combine the search vectors, such as the bitwise OR or AND operators.
rhs[SearchVectorCombinable](searchvectorcombinable.md?sid=django_contrib_postgres_search_searchvectorcombinable)The right-hand side expression or search vector to be combined.
configstringThe search configuration or dictionary name used for text search processing.
output_field[Field](../../../forms/fields/field.md?sid=django_forms_fields_field) = NoneThe Django model field type that represents the resulting combined expression.