mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-01-06 09:12:55 +00:00
* fix windows build (#1) * Fix windows build * Add doc traits * Add field value iter * Add value and serialization * Adjust order * Fix bug * Correct type * Fix generic bugs * Reformat code * Add generic to index writer which I forgot about * Fix missing generics on single segment writer * Add missing type export * Add default methods for convenience * Cleanup * Fix more-like-this query to use standard types * Update API and fix tests * Add doc traits * Add field value iter * Add value and serialization * Adjust order * Fix bug * Correct type * Rebase main and fix conflicts * Reformat code * Merge upstream * Fix missing generics on single segment writer * Add missing type export * Add default methods for convenience * Cleanup * Fix more-like-this query to use standard types * Update API and fix tests * Add tokenizer improvements from previous commits * Add tokenizer improvements from previous commits * Reformat * Fix unit tests * Fix unit tests * Use enum in changes * Stage changes * Add new deserializer logic * Add serializer integration * Add document deserializer * Implement new (de)serialization api for existing types * Fix bugs and type errors * Add helper implementations * Fix errors * Reformat code * Add unit tests and some code organisation for serialization * Add unit tests to deserializer * Add some small docs * Add support for deserializing serde values * Reformat * Fix typo * Fix typo * Change repr of facet * Remove unused trait methods * Add child value type * Resolve comments * Fix build * Fix more build errors * Fix more build errors * Fix the tests I missed * Fix examples * fix numerical order, serialize PreTok Str * fix coverage * rename Document to TantivyDocument, rename DocumentAccess to Document add Binary prefix to binary de/serialization * fix coverage --------- Co-authored-by: Pascal Seitz <pascal.seitz@gmail.com>
27 lines
667 B
Rust
27 lines
667 B
Rust
use crate::query::Weight;
|
|
use crate::schema::document::Document;
|
|
use crate::schema::{TantivyDocument, Term};
|
|
use crate::Opstamp;
|
|
|
|
/// Timestamped Delete operation.
|
|
pub struct DeleteOperation {
|
|
pub opstamp: Opstamp,
|
|
pub target: Box<dyn Weight>,
|
|
}
|
|
|
|
/// Timestamped Add operation.
|
|
#[derive(Eq, PartialEq, Debug)]
|
|
pub struct AddOperation<D: Document = TantivyDocument> {
|
|
pub opstamp: Opstamp,
|
|
pub document: D,
|
|
}
|
|
|
|
/// UserOperation is an enum type that encapsulates other operation types.
|
|
#[derive(Eq, PartialEq, Debug)]
|
|
pub enum UserOperation<D: Document = TantivyDocument> {
|
|
/// Add operation
|
|
Add(D),
|
|
/// Delete operation
|
|
Delete(Term),
|
|
}
|