Introduce the AttrCount type

This commit is contained in:
Clément Renault
2019-11-27 17:01:23 +01:00
committed by Clément Renault
parent 5b9fff6636
commit 11f3d7782d
7 changed files with 22 additions and 14 deletions

View File

@ -12,7 +12,7 @@ pub struct RawDocument {
pub id: DocumentId,
pub matches: SharedMatches,
pub highlights: Vec<Highlight>,
pub fields_counts: SetBuf<(SchemaAttr, u64)>,
pub fields_counts: SetBuf<(SchemaAttr, u16)>,
}
impl RawDocument {
@ -101,7 +101,7 @@ impl fmt::Debug for RawDocument {
pub fn raw_documents_from(
matches: SetBuf<(DocumentId, TmpMatch)>,
highlights: SetBuf<(DocumentId, Highlight)>,
fields_counts: SetBuf<(DocumentId, SchemaAttr, u64)>,
fields_counts: SetBuf<(DocumentId, SchemaAttr, u16)>,
) -> Vec<RawDocument> {
let mut docs_ranges: Vec<(_, Range, _, _)> = Vec::new();
let mut matches2 = Matches::with_capacity(matches.len());