caio.co/de/cantine

Use tantivy 0.13

Id
627e094aa7d9b2f1531b9eba4e75bc88c4021086
Author
Caio
Commit time
2020-11-01T11:09:21+01:00

Modified cantine/Cargo.toml

@@ -23,7 +23,7
memmap = "0.7"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
-tantivy = "0.12"
+tantivy = "0.13"
uuid = { version = "0.8", features = ["serde"] }
zerocopy = "0.2"

Modified cantine_derive/Cargo.toml

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

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

Modified cantine_derive/src/lib.rs

@@ -78,19 +78,19
fn from_query(query: &Q) -> Self;
}

-pub trait Aggregable: Sized + Sync {
- type Query: Sync + Clone;
+pub trait Aggregable: Sized + Send + Sync {
+ type Query: Send + Sync + Clone;
type Agg: Aggregator<Self::Query, Self>;
}

-pub trait AggregableForSegment<T>: Sync {
+pub trait AggregableForSegment<T>: Send + Sync {
type Output: AggregableForDoc<T>;
fn for_segment(&self, reader: &SegmentReader) -> Self::Output;
}

impl<T, F, O> AggregableForSegment<T> for F
where
- F: Sync + Fn(&SegmentReader) -> O,
+ F: Send + Sync + Fn(&SegmentReader) -> O,
O: AggregableForDoc<T>,
{
type Output = O;
@@ -122,7 +122,7
impl<T, F, O> Collector for AggregableCollector<T, F>
where
T: 'static + Aggregable,
- F: AggregableForSegment<T, Output = O>,
+ F: Send + AggregableForSegment<T, Output = O>,
O: 'static + AggregableForDoc<T>,
{
type Fruit = T::Agg;