概述 我想在Drupal 7中创建一个产品搜索。我创建了一个视图并公开了我想要用于搜索(过滤)的字段。搜索工作完美,但仅当您使用项目标题搜索项目时。
问题: 我希望用户能够使用所有过滤器输入更具“描述性的搜索”:
查看SQL代码示例
SELECT node.nid AS nid, node.type AS node_type, node.language AS node_language, node.title AS node_title, uc_products.model AS uc_products_model, node.created AS node_created, 'node' AS field_data_uc_product_image_node_entity_type, 'node' AS field_data_field_product_variant_node_entity_type, 'node' AS field_data_body_node_entity_type, 'node' AS field_data_field_product_tags_node_entity_type
FROM
{node} node
LEFT JOIN {field_data_body} field_data_body ON node.nid = field_data_body.entity_id AND (field_data_body.entity_type = 'node' AND field_data_body.deleted = '0')
LEFT JOIN {field_data_field_product_variant} field_data_field_product_variant ON node.nid = field_data_field_product_variant.entity_id AND (field_data_field_product_variant.entity_type = 'node' AND field_data_field_product_variant.deleted = '0')
LEFT JOIN {uc_products} uc_products ON node.vid = uc_products.vid
WHERE (( (node.status = '1') AND (node.type IN ('product')) AND (field_data_body.body_value LIKE '%%' ESCAPE '\\') AND (field_data_field_product_variant.field_product_variant_value LIKE '%%' ESCAPE '\\') ))
ORDER BY node_created DESC, node_title ASC
LIMIT 6 OFFSET 0
我想知道我做错了什么。我希望将所有公开的过滤器实体合并为一个,以便可以从一个搜索框中搜索/过滤它们。
您的回复非常感谢。