mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Polish some details
This commit is contained in:
parent
cb8442a119
commit
51961e1064
5 changed files with 11 additions and 34 deletions
|
@ -1,8 +1,10 @@
|
|||
use crate::{try_split_array_at, DocumentId, FieldId};
|
||||
use heed::{BytesDecode, BytesEncode};
|
||||
use std::borrow::Cow;
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use heed::{BytesDecode, BytesEncode};
|
||||
|
||||
use crate::{try_split_array_at, DocumentId, FieldId};
|
||||
|
||||
pub struct FieldDocIdFacetCodec<C>(PhantomData<C>);
|
||||
|
||||
impl<'a, C> BytesDecode<'a> for FieldDocIdFacetCodec<C>
|
||||
|
|
|
@ -40,6 +40,8 @@ pub struct FacetGroupKey<T> {
|
|||
pub left_bound: T,
|
||||
}
|
||||
|
||||
/// The value in the [`facet_id_string_docids` and `facet_id_f64_docids`][`Index::facet_id_string_docids`]
|
||||
/// databases.
|
||||
#[derive(Debug)]
|
||||
pub struct FacetGroupValue {
|
||||
pub size: u8,
|
||||
|
@ -102,6 +104,8 @@ impl<'a> heed::BytesDecode<'a> for FacetGroupValueCodec {
|
|||
}
|
||||
}
|
||||
|
||||
/// A codec for values of type `&[u8]`. Unlike `ByteSlice`, its `EItem` and `DItem` associated
|
||||
/// types are equivalent (= `&'a [u8]`) and these values can reside within another structure.
|
||||
pub struct ByteSliceRef;
|
||||
|
||||
impl<'a> BytesEncode<'a> for ByteSliceRef {
|
||||
|
|
|
@ -2,6 +2,8 @@ use std::borrow::Cow;
|
|||
|
||||
use heed::{BytesDecode, BytesEncode};
|
||||
|
||||
/// A codec for values of type `&str`. Unlike `Str`, its `EItem` and `DItem` associated
|
||||
/// types are equivalent (= `&'a str`) and these values can reside within another structure.
|
||||
pub struct StrRefCodec;
|
||||
impl<'a> BytesEncode<'a> for StrRefCodec {
|
||||
type EItem = &'a str;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue