mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-26 23:04:26 +01:00
commit
06d5a10902
@ -21,7 +21,6 @@ const DATA_SCHEMA: &[u8] = b"data-schema";
|
||||
|
||||
pub mod schema;
|
||||
pub(crate) mod index;
|
||||
mod deserializer;
|
||||
mod document_key;
|
||||
mod serde;
|
||||
mod update;
|
||||
|
@ -19,6 +19,7 @@ pub mod find_id;
|
||||
pub mod key_to_string;
|
||||
pub mod serializer;
|
||||
pub mod indexer_serializer;
|
||||
pub mod deserializer;
|
||||
|
||||
pub fn calculate_hash<T: Hash>(t: &T) -> u64 {
|
||||
let mut s = DefaultHasher::new();
|
||||
|
@ -9,7 +9,7 @@ use serde::de::DeserializeOwned;
|
||||
|
||||
use crate::database::{DocumentKey, DocumentKeyAttr};
|
||||
use crate::database::{retrieve_data_schema, retrieve_data_index};
|
||||
use crate::database::deserializer::Deserializer;
|
||||
use crate::database::serde::deserializer::Deserializer;
|
||||
use crate::database::schema::Schema;
|
||||
use crate::database::index::Index;
|
||||
use crate::rank::{QueryBuilder, FilterFunc};
|
||||
|
@ -18,7 +18,7 @@ pub struct Document {
|
||||
}
|
||||
|
||||
impl Document {
|
||||
pub fn from_raw(raw: &RawDocument) -> Document {
|
||||
fn from_raw(raw: &RawDocument) -> Document {
|
||||
let len = raw.matches.range.len();
|
||||
let mut matches = Vec::with_capacity(len);
|
||||
|
||||
|
@ -136,7 +136,7 @@ where D: Deref<Target=DB>,
|
||||
FI: Fn(DocumentId, &DatabaseView<D>) -> bool,
|
||||
{
|
||||
pub fn query(self, query: &str, range: Range<usize>) -> Vec<Document> {
|
||||
// We give the filtering work to the query distinct builder,
|
||||
// We delegate the filter work to the distinct query builder,
|
||||
// specifying a distinct rule that has no effect.
|
||||
if self.filter.is_some() {
|
||||
let builder = self.with_distinct(|_, _| None as Option<()>, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user