use distinct on search

This commit is contained in:
qdequele 2020-03-02 14:34:29 +01:00
parent 72450c765d
commit a2f0f95337
No known key found for this signature in database
GPG key ID: B3F0A000EBF11745
6 changed files with 44 additions and 9 deletions

View file

@ -254,6 +254,21 @@ impl Index {
}
}
pub fn document_attribute_bytes<'txn>(
&self,
reader: &'txn heed::RoTxn<MainT>,
document_id: DocumentId,
attribute: FieldId,
) -> MResult<Option<&'txn [u8]>> {
let bytes = self
.documents_fields
.document_attribute(reader, document_id, attribute)?;
match bytes {
Some(bytes) => Ok(Some(bytes)),
None => Ok(None),
}
}
pub fn customs_update(&self, writer: &mut heed::RwTxn<UpdateT>, customs: Vec<u8>) -> ZResult<u64> {
let _ = self.updates_notifier.send(UpdateEvent::NewUpdate);
update::push_customs_update(writer, self.updates, self.updates_results, customs)