2012-09-13 26 views
0

我試圖把所有的黑客新聞評論匹配:ThriftDB Rest API如何獲得值的範圍匹配?

  • 在過去24小時內創建

  • 超過10分(例如)

用下面的查詢:

http://api.thriftdb.com/api.hnsearch.com/items/_search?pretty_print=true&filter[fields][create_ts]=[NOW-100HOURS%20TO%20NOW]&filter[fields][points]=10

filter[fields][points]=10爲我提供了所有正好匹配10分的項目,但沒有超過10分的項目。我如何獲得超過10分的所有物品?

doc to the ThirftDB Rest API is here但我只是不知道該怎麼做。

回答

2
+0

非常感謝。任何想法爲什麼添加&filter [fields] [type] = [comment]的相同請求不起作用?該文檔在這裏:http://www.hnsearch.com/api'類型'似乎在'點'的水平... – tucson

+1

@tucson,我得到它與'查詢'工作,但沒有'過濾器':[http://api.thriftdb.com/api.hnsearch.com/items/_search?pretty_print=true&filter\[fields\]\[create_ts\]=\[NOW-100HOURS TO NOW \]&filter \ [fields \] \ [點\] = \ [20 + TO + * \]濾波器\ [查詢\] \ [\] =類型: 「註釋」](http://api.thriftdb.com/api.hnsearch.com/項目/ _search?pretty_print =真濾波器%5Bfields%5D%5Bcreate_ts%5D =%5BNOW-100小時%20TO%20NOW%5D&濾波器%5Bfields%5D%5Bpoints%5D =%5B20%20TO%20 *%5D&濾波器%5Bqueries%5D%5B %5D =類型:%22註釋%22) –

+0

太棒了!再次感謝你。 – tucson