Move the Object type in the lib.rs file and use it everywhere

This commit is contained in:
Kerollmops 2022-06-15 15:36:27 +02:00
parent 0146175fe6
commit fcfc4caf8c
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
11 changed files with 43 additions and 51 deletions

View file

@ -4,12 +4,10 @@ use std::{io, str};
use heed::{Error as HeedError, MdbError};
use rayon::ThreadPoolBuildError;
use serde_json::{Map, Value};
use serde_json::Value;
use thiserror::Error;
use crate::{CriterionError, DocumentId, FieldId, SortError};
pub type Object = Map<String, Value>;
use crate::{CriterionError, DocumentId, FieldId, Object, SortError};
pub fn is_reserved_keyword(keyword: &str) -> bool {
["_geo", "_geoDistance", "_geoPoint", "_geoRadius"].contains(&keyword)