Skip to main content

CombinedSearchQuery

This class represents a combination of two full-text search queries using a logical connector. It inherits from both SearchQueryCombinable and CombinedExpression to facilitate complex search operations within a database query. The class manages the left-hand and right-hand query components along with their specific search configuration.

Attributes

AttributeTypeDescription
configstringConfiguration settings for the search query, such as the language or search dictionary to be used during execution.

Constructor

Signature

def CombinedSearchQuery(
lhs: [SearchQueryCombinable](searchquerycombinable.md?sid=django_contrib_postgres_search_searchquerycombinable),
connector: str,
rhs: [SearchQueryCombinable](searchquerycombinable.md?sid=django_contrib_postgres_search_searchquerycombinable),
config: Any,
output_field: [Field](../../../forms/fields/field.md?sid=django_forms_fields_field) = None
) - > null

Parameters

NameTypeDescription
lhs[SearchQueryCombinable](searchquerycombinable.md?sid=django_contrib_postgres_search_searchquerycombinable)The left-hand side operand of the search query combination.
connectorstrThe operator used to connect the search queries (e.g., AND, OR).
rhs[SearchQueryCombinable](searchquerycombinable.md?sid=django_contrib_postgres_search_searchquerycombinable)The right-hand side operand of the search query combination.
configAnyThe configuration settings to be applied to the search query.
output_field[Field](../../../forms/fields/field.md?sid=django_forms_fields_field) = NoneThe model field that defines the output type of this expression.

Signature

def CombinedSearchQuery(
lhs: [SearchQueryCombinable](searchquerycombinable.md?sid=django_contrib_postgres_search_searchquerycombinable),
connector: str,
rhs: [SearchQueryCombinable](searchquerycombinable.md?sid=django_contrib_postgres_search_searchquerycombinable),
config: str,
output_field: [Field](../../../forms/fields/field.md?sid=django_forms_fields_field) = None
)

Parameters

NameTypeDescription
lhs[SearchQueryCombinable](searchquerycombinable.md?sid=django_contrib_postgres_search_searchquerycombinable)The left-hand side search query expression to be combined.
connectorstrThe operator used to combine the queries, such as AND or OR.
rhs[SearchQueryCombinable](searchquerycombinable.md?sid=django_contrib_postgres_search_searchquerycombinable)The right-hand side search query expression to be combined.
configstrThe search configuration or dictionary used for full-text search parsing.
output_field[Field](../../../forms/fields/field.md?sid=django_forms_fields_field) = NoneThe model field type that represents the result of this expression.