背景
我试图将两个功能分开工作,但很难让它们一起工作。Solr - 方法查询中的{!}}
* 1)如solr wiki所述,我可以标记特定的fq,然后将其排除在我的facet.field上。这将使我的面计数当选择某个值,这样保持不变甚至:
fq={!tag=pt}price:100&facet=true&facet.field={!ex=pt}price
* 2)我想用facet.query如下:
facet=true&facet.query=price:[0 TO 100]&facet.query=price:[100 TO *]
所以我想结合* 1 & * 2,这是我的尝试:
fq={!tag=pt}price:[0 to 100]&facet=true&facet.query={!ex=pt}price:[0 TO 100]&facet.query={!ex=pt}price:[100 TO *]
实际发生的是,我收到回从Solr的:
<lst name="facet_queries">
<int name="{!ex=pt}price:[0 TO 100]">8</int>
<int name="{!ex=pt}price:[100 TO *]">19</int>
</lst>
我的问题是:
为什么是名称的一部分{EX = PT!}?这弄乱了我的一些逻辑。 也许我滥用了它,如果是这样的话,那么正确的方法是什么?
更多信息
什么我期待是这样的:(同我收到如果运行* 2 *无1)
<lst name="facet_queries">
<int name="price:[0 TO 100]">8</int>
<int name="price:[100 TO *]">19</int>
</lst>
这是有道理的,因为如果我运行* 1这是我收到的facet_fields:
<lst name="facet_fields">
<lst name="price">
<int name="80">8</int>
<int name="150">19</int>
</lst>
</lst>
这并不是说名字= “{价格=前PT!}”
工作+现在我明白它背后的原因,谢谢:) –