caio.co/de/cantine

Adapt cantine_derive to tantivy 0.15

Id
6fde1ca2b37e0455e5db22762c334374249f3d2f
Author
Caio
Commit time
2021-06-14T16:26:49+02:00

Modified cantine_derive/Cargo.toml

@@ -8,7 +8,7
[dependencies]
cantine_derive_internal = { path = "./internal" }
serde = { version = "1.0" }
-tantivy = "0.14"
+tantivy = "0.15"

[dev-dependencies]
serde = { version = "1.0", features = ["derive"] }

Modified cantine_derive/src/lib.rs

@@ -5,7 +5,7
collector::{Collector, SegmentCollector},
query::Query,
schema::{IntOptions, Schema, SchemaBuilder},
- DocId, Document, Result, Score, SegmentLocalId, SegmentReader,
+ DocId, Document, Result, Score, SegmentOrdinal, SegmentReader,
};

pub use cantine_derive_internal::{Aggregable, Filterable};
@@ -130,7 +130,7

fn for_segment(
&self,
- _segment_id: SegmentLocalId,
+ _segment_ord: SegmentOrdinal,
segment_reader: &SegmentReader,
) -> Result<Self::Child> {
Ok(AggregableSegmentCollector {