mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-27 04:25:06 +08:00
Add method to create a query builder along with criterion
This commit is contained in:
parent
0ac927794a
commit
485480560a
@ -17,8 +17,9 @@ pub use self::updates_results::UpdatesResults;
|
|||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use meilidb_schema::{Schema, SchemaAttr};
|
use meilidb_schema::{Schema, SchemaAttr};
|
||||||
use serde::de;
|
use serde::de;
|
||||||
use crate::{update, query_builder::QueryBuilder, DocumentId, MResult, Error};
|
use crate::criterion::Criteria;
|
||||||
use crate::serde::Deserializer;
|
use crate::serde::Deserializer;
|
||||||
|
use crate::{update, query_builder::QueryBuilder, DocumentId, MResult, Error};
|
||||||
|
|
||||||
fn aligned_to(bytes: &[u8], align: usize) -> bool {
|
fn aligned_to(bytes: &[u8], align: usize) -> bool {
|
||||||
(bytes as *const _ as *const () as usize) % align == 0
|
(bytes as *const _ as *const () as usize) % align == 0
|
||||||
@ -164,6 +165,10 @@ impl Index {
|
|||||||
pub fn query_builder(&self) -> QueryBuilder {
|
pub fn query_builder(&self) -> QueryBuilder {
|
||||||
QueryBuilder::new(self.main, self.postings_lists, self.synonyms)
|
QueryBuilder::new(self.main, self.postings_lists, self.synonyms)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn query_builder_with_criteria<'c>(&self, criteria: Criteria<'c>) -> QueryBuilder<'c> {
|
||||||
|
QueryBuilder::with_criteria(self.main, self.postings_lists, self.synonyms, criteria)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create(
|
pub fn create(
|
||||||
|
Loading…
Reference in New Issue
Block a user