主页 > 论坛 > 设计与开发 >

多字段匹配查询的定义

You need to be logged in to get access to the forums. You can do so here

Author Message

xuehenwuji Du

星期三, 2008年 十一月 05日 8:48:13 am

我想建立一个多字段匹配查询的搜索功能,比如有一个汽车的类,其中包含车名,轮胎,排放量。现在我需要通过车名,排放量两个字段定位到一个汽车实例。请问,系统本身有这样搜索引擎的定义功能吗,如果有,我需要如何去做,

陈 明星

星期五, 2008年 十一月 07日 4:12:09 am

首先, 在site.ini(.append) 的 [SearchSettings]中AllowEmptySearch=enabled <code> <form action={"/content/advancedsearch/"|ezurl} method="get"> 搜索条件一 <input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="110" /> //“ 搜索条件一”,是class中的一个attribute(比如汽车名字)110 是你“ 搜索条件一”的ID值(attribute ID) <input type="text" name="Content_search_attribute_fulltext_value[]" value="{$search_array_by_class_attribute_id['110']['value']}" /> 搜索条件二 <input type="hidden" name="Content_search_attribute_fulltext_classattribute_id[]" value="111" /> //“ 搜索条件二”,是class中的一个attribute(比如轮胎)111 是你“ 搜索条件二”的ID值(attribute ID) <input type="text" name="Content_search_attribute_fulltext_value[]" value="{$search_array_by_class_attribute_id['111]['value']}" /> <input type="submit" value="Search" name="SearchButton"> </form> <code>

xuehenwuji Du

星期一, 2008年 十一月 10日 3:31:41 am

Thank You! 我已经创建成功