Struct tantivy::query::RangeQuery[][src]

pub struct RangeQuery { /* fields omitted */ }

RangeQuery match all documents that have at least one term within a defined range.

Matched document will all get a constant Score of one.

Implementation

The current implement will iterate over the terms within the range and append all of the document cross into a BitSet.

Example


let searcher = index.searcher();

let docs_in_the_sixties = RangeQuery::new_u64(year_field, 1960..1970);

let mut count_collector = CountCollector::default();
docs_in_the_sixties.search(&searcher, &mut count_collector)?;

let num_60s_books = count_collector.count();

Methods

impl RangeQuery
[src]

Creates a new RangeQuery from bounded start and end terms.

If the value type is not correct, something may go terribly wrong when the Weight object is created.

Creates a new RangeQuery over a i64 field.

If the field is not of the type i64, tantivy will panic when the Weight object is created.

Create a new RangeQuery over a i64 field.

The two Bound arguments make it possible to create more complex ranges than semi-inclusive range.

If the field is not of the type i64, tantivy will panic when the Weight object is created.

Create a new RangeQuery over a u64 field.

The two Bound arguments make it possible to create more complex ranges than semi-inclusive range.

If the field is not of the type u64, tantivy will panic when the Weight object is created.

Create a new RangeQuery over a u64 field.

If the field is not of the type u64, tantivy will panic when the Weight object is created.

Create a new RangeQuery over a Str field.

The two Bound arguments make it possible to create more complex ranges than semi-inclusive range.

If the field is not of the type Str, tantivy will panic when the Weight object is created.

Create a new RangeQuery over a Str field.

If the field is not of the type Str, tantivy will panic when the Weight object is created.

Field to search over

Lower bound of range

Upper bound of range

Trait Implementations

impl Clone for RangeQuery
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for RangeQuery
[src]

Formats the value using the given formatter. Read more

impl Query for RangeQuery
[src]

Create the weight associated to a query. Read more

Returns the number of documents matching the query.

Extract all of the terms associated to the query and insert them in the term set given in arguments. Read more

Search works as follows : Read more

Auto Trait Implementations

impl Send for RangeQuery

impl Sync for RangeQuery