背景
我試圖將兩個功能分開工作,但很難讓它們一起工作。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!}」
工作+現在我明白它背後的原因,謝謝:) –