Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/solr/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Coldfusion CFSEARCH:使用Solr索引SQL数据_Coldfusion_Solr_Indexing_Cfsearch - Fatal编程技术网

Coldfusion CFSEARCH:使用Solr索引SQL数据

Coldfusion CFSEARCH:使用Solr索引SQL数据,coldfusion,solr,indexing,cfsearch,Coldfusion,Solr,Indexing,Cfsearch,我阅读了Ben Forta编写的Web应用程序构建工具包中的索引SQL数据一章 将查询对象传递给CFINDEX标记对于从头开始构建索引非常有用,可以将我的表的productName设置为文档标题,productDescription设置为正文,等等 无论如何,我的查询生成如下结果集: productName | attributeType | attributeValue prod1 | color | green p

我阅读了Ben Forta编写的Web应用程序构建工具包中的索引SQL数据一章

将查询对象传递给CFINDEX标记对于从头开始构建索引非常有用,可以将我的表的productName设置为文档标题,productDescription设置为正文,等等

无论如何,我的查询生成如下结果集:

productName    |    attributeType    |    attributeValue

prod1          |    color            |    green
prod1          |    gender           |    man
prod2          |    color            |    blue
prod2          |    gender           |    woman
prod3          |    color            |    green
prod3          |    gender           |    unisex
。。。等等


我必须如何索引/搜索才能搜索我正在寻找一块绿色手表,我是一个男人,确保首先找到产品1?

考虑使用类别-您必须创建一个支持类别的集合,这会带来一些开销,并在索引db记录时提供类别属性。然后,在搜索时,您可以将范围限制为感兴趣的类别。顺便说一句,如果需要,可以对单个项目应用多个类别