Solr 动态搜索

Solr 动态搜索,solr,solrnet,Solr,Solrnet,我有两个动态字段,如“产品名称-*”*和“产品评级-*”。 一份文件可以包含5种产品和相应的评级,如下所示 <str name="Product-Name-0">HTC Wildfire S</str> <str name="Product-Name-1">Samsung Tab 2</str> <str name="Product-Name-2">Samsung Note</str> <str name="Produ

我有两个动态字段,如“产品名称-*”*和“产品评级-*”。 一份文件可以包含5种产品和相应的评级,如下所示

<str name="Product-Name-0">HTC Wildfire S</str>
<str name="Product-Name-1">Samsung Tab 2</str>
<str name="Product-Name-2">Samsung Note</str>
<str name="Product-Name-3">IPhone5</str>
<str name="Product-Name-4">Nokia Lumia 720</str>
<int name="Product-Rating-0">5</int>
<int name="Product-Rating-1">9</int>
<int name="Product-Rating-2">7</int>
<int name="Product-Rating-3">9</int>
<int name="Product-Rating-4">9</int>
我本可以用Product Name-*:IPhone5来查找所有文档,但问题是我不知道如何根据其各自的产品评级来提升该产品

有谁能指导我是否遵循正确的方法

或者有没有其他方法来实现这一点


提前感谢。

我认为您的模式设计本身存在问题,为什么在一个文档中有多个名称和评级。理想情况下,每个名称都应该是单独的文档,并有自己的评级,这样您就可以使用评级值本身的一些函数来提升它

如果尝试在字段名中使用通配符,可能会出现解析错误(至少在我的安装中是这样)您能告诉我们您使用的是哪个solr版本吗?我使用的是solr 4.0 Alpha。有没有办法将上述查询转换为eDiscoveryMax?没有umar。这只是一个示例模式。据我所知,模式都很好。如果用户搜索某个主题,您可以举一个学生信息的示例,如下面的科学数学经济学历史地理50 90 70 90 90名字,我需要提高那些有更多分数的医生。
(Product-Name-0:IPhone5 AND (Product-Rating-0:7^3 OR Product-Rating-0:8^4 OR Product-Rating-0:9^5 OR Product-Rating-0:10^6)) OR 
(Product-Name-1:IPhone5 AND (Product-Rating-1:7^3 OR Product-Rating-1:8^4 OR Product-Rating-1:9^5 OR Product-Rating-1:10^6)) OR
(Product-Name-2:IPhone5 AND (Product-Rating-2:7^3 OR Product-Rating-2:8^4 OR Product-Rating-2:9^5 OR Product-Rating-2:10^6)) OR
(Product-Name-3:IPhone5 AND (Product-Rating-3:7^3 OR Product-Rating-3:8^4 OR Product-Rating-3:9^5 OR Product-Rating-3:10^6)) OR
(Product-Name-4:IPhone5 AND (Product-Rating-4:7^3 OR Product-Rating-4:8^4 OR Product-Rating-4:9^5 OR Product-Rating-4:10^6))