mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-30 00:34:26 +01:00
Introduce the FieldIdFacetExistsDocidsExtractor
This commit is contained in:
parent
0b061f1e70
commit
9c0a1cd9fd
@ -210,9 +210,23 @@ impl FacetedExtractor for FieldIdFacetStringDocidsExtractor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract fieldid facet isempty docids
|
|
||||||
// Extract fieldid facet isnull docids
|
// Extract fieldid facet isnull docids
|
||||||
// Extract fieldid facet exists docids
|
|
||||||
|
pub struct FieldIdFacetExistsDocidsExtractor;
|
||||||
|
impl FacetedExtractor for FieldIdFacetExistsDocidsExtractor {
|
||||||
|
fn attributes_to_extract<'a>(rtxn: &'a RoTxn, index: &'a Index) -> Result<HashSet<String>> {
|
||||||
|
index.user_defined_faceted_fields(rtxn)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn build_key<'b>(
|
||||||
|
field_id: FieldId,
|
||||||
|
_value: &Value,
|
||||||
|
output: &'b mut Vec<u8>,
|
||||||
|
) -> Option<&'b [u8]> {
|
||||||
|
output.extend_from_slice(&field_id.to_be_bytes());
|
||||||
|
Some(&*output)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub struct FieldIdFacetIsEmptyDocidsExtractor;
|
pub struct FieldIdFacetIsEmptyDocidsExtractor;
|
||||||
impl FacetedExtractor for FieldIdFacetIsEmptyDocidsExtractor {
|
impl FacetedExtractor for FieldIdFacetIsEmptyDocidsExtractor {
|
||||||
|
Loading…
Reference in New Issue
Block a user