在Solr中搜索多值类别树(左/右)

在Solr中搜索多值类别树(左/右),solr,Solr,我使用Solr存储产品。每个产品可以有多个类别 <field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" /> <field name="sku" type="text_en_splitting_tight" indexed="true" stored="true" omitNorms="true"/> <field name="c

我使用Solr存储产品。每个产品可以有多个类别

<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" /> 
<field name="sku" type="text_en_splitting_tight" indexed="true" stored="true" omitNorms="true"/>
<field name="cat" type="string" indexed="true" stored="true" multiValued="true"/>
<field name="cat_left" type="int" indexed="true" stored="true" multiValued="true"/>
<field name="cat_right" type="int" indexed="true" stored="true"  multiValued="true"/>
我要问:

+cat_left:[4 TO *] +cat_right:[* TO 5]
产品将明显返回,因为左最小值为2,右最大值为8。索尔不知道左边等于2,右边等于3。这些字段没有关联


我喜欢左/右方法,因为它是查询树的快速方法,但是可以将它与Solr一起使用吗?也许我太复杂了,而且Solr有一个很好的树支持?

我的问题的答案是一维()

{left: 2, right: 3}
{left: 6, right: 8}
+cat_left:[4 TO *] +cat_right:[* TO 5]