mirror of
https://github.com/quickwit-oss/tantivy.git
synced 2026-05-26 21:20:40 +00:00
rebasing, fixing some test
This commit is contained in:
@@ -252,7 +252,6 @@ mod tests {
|
||||
use crate::Postings;
|
||||
use crate::ReloadPolicy;
|
||||
use rand::distributions::Bernoulli;
|
||||
use rand::distributions::Uniform;
|
||||
use rand::rngs::StdRng;
|
||||
use rand::{Rng, SeedableRng};
|
||||
|
||||
@@ -278,10 +277,6 @@ mod tests {
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn sample(n: u32, ratio: f64) -> Vec<u32> {
|
||||
sample_with_seed(n, ratio, 4)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "mmap")]
|
||||
fn test_indexing() {
|
||||
|
||||
@@ -124,10 +124,6 @@ mod tests {
|
||||
use crate::common::BitSet;
|
||||
use crate::docset::{DocSet, SkipResult};
|
||||
use crate::DocId;
|
||||
use rand::distributions::Uniform;
|
||||
use rand::rngs::StdRng;
|
||||
use rand::{Rng, SeedableRng};
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
fn create_docbitset(docs: &[DocId], max_doc: DocId) -> BitSetDocSet {
|
||||
let mut docset = BitSet::with_max_value(max_doc);
|
||||
|
||||
@@ -26,7 +26,7 @@ directory.
|
||||
### Example
|
||||
|
||||
```
|
||||
use tantivy::schema::*;
|
||||
use tantivy_schema::*;
|
||||
let mut schema_builder = Schema::builder();
|
||||
let title_options = TextOptions::default()
|
||||
.set_stored()
|
||||
@@ -59,7 +59,7 @@ when [`searcher.doc(doc_address)`](../struct.Searcher.html#method.doc) is called
|
||||
### Example
|
||||
|
||||
```
|
||||
use tantivy::schema::*;
|
||||
use tantivy_schema::*;
|
||||
let mut schema_builder = Schema::builder();
|
||||
let num_stars_options = IntOptions::default()
|
||||
.set_stored()
|
||||
@@ -93,7 +93,7 @@ using the `|` operator.
|
||||
For instance, a schema containing the two fields defined in the example above could be rewritten :
|
||||
|
||||
```
|
||||
use tantivy::schema::*;
|
||||
use tantivy_schema::*;
|
||||
let mut schema_builder = Schema::builder();
|
||||
schema_builder.add_u64_field("num_stars", INDEXED | STORED);
|
||||
schema_builder.add_text_field("title", TEXT | STORED);
|
||||
|
||||
@@ -21,7 +21,7 @@ use std::sync::Arc;
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use tantivy::schema::*;
|
||||
/// use tantivy_schema::*;
|
||||
///
|
||||
/// let mut schema_builder = Schema::builder();
|
||||
/// let id_field = schema_builder.add_text_field("id", STRING);
|
||||
@@ -208,7 +208,7 @@ impl Eq for InnerSchema {}
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// use tantivy::schema::*;
|
||||
/// use tantivy_schema::*;
|
||||
///
|
||||
/// let mut schema_builder = Schema::builder();
|
||||
/// let id_field = schema_builder.add_text_field("id", STRING);
|
||||
|
||||
Reference in New Issue
Block a user