quickwit-oss/tantivy

Range queries on JSON fields

開放

#1,709 建立於 2022年12月5日

 (12 則留言) (0 個反應) (0 位負責人)Rust (978 個分叉)batch import
help wanted

倉庫指標

星標
 (15,972 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Is your feature request related to a problem? Please describe.

I cannot perform range queries on JSON fields. For example, the examples/json_field.rs has a search like so:

    {
        let query = query_parser.parse_query("cart.product_id:103")?;
        let count_docs = searcher.search(&*query, &Count)?;
        assert_eq!(count_docs, 1);
    }

But I cannot rewrite the query like this:

    {
        let query = query_parser.parse_query("cart.product_id < 110")?;
        let count_docs = searcher.search(&*query, &Count)?;
        assert_eq!(count_docs, 1);
    }

the count comes back 0.

Describe the solution you'd like

We should be able to search nested JSON documents with the usual <, >, etc.

貢獻者指南