这是怎么回事 我有两张桌子
businessmasters
Business_id Business_point
1 3.4
2 2.8
3 8.0
business_Colors
business_colors_id business_rating_from business_rating_to rating
1 2 5 OK
2 5 10 GOOD
3 10 15 Excellent
我想基于business_rating_from和business_rating_to链接两个表,如
SELECT business_colors_id,business_rating_from,business_rating_to,rating where
business_rating_from >= 2 AND business_rating_to < 5;
现在我想将它们索引到solr.This是我的数据配置文件看起来
<entity name="business_colors" query="SELECT business_colors_id,
business_rating_from,business_rating_to,business_text,hex_colors,rgb_colors,business_colors_modify
from business_colors where business_rating_from >= '${businessmasters.business_point}' AND
business_rating_to < '${businessmasters.business_point}'"
deltaQuery="select business_colors_id from business_colors where business_colors_modify >
'${dih.last_index_time}'"
parentDeltaQuery="select business_id from businessmasters where business_point <
${business_colors.business_rating_from} AND business_point >=
${business_colors.business_rating_from}">
<field column="business_colors_id" name="id"/>
<field column="business_rating_from" name="business_rating_from" indexed="true" stored="true" />
<field column="business_rating_to" name="business_rating_to" indexed="true" stored="true" />
<field column="business_text" name="business_text" indexed="true" stored="true" />
<field column="hex_colors" name="hex_colors" indexed="true" stored="true" />
<field column="rgb_colors" name="rgb_colors" indexed="true" stored="true" />
<field column="business_colors_modify" name="business_colors_modify" indexed="true"
stored="true"/>
当我点击完整索引数据时,没有索引,也没有显示错误。 这有什么问题,任何人都可以提供帮助和建议。 我如何实现我想做的事情 我所看到的是,如果我用OR替换AND它工作正常。为什么OR工作和AND工作
答案 0 :(得分:0)
您的查询可能不会返回任何记录的事实就是这一点。既然你提到它
如果我用OR替换AND它工作正常。为什么OR工作和AND工作