Fix document iterator comparison

This commit is contained in:
ozanarmagan 2023-07-28 18:28:29 +03:00
parent 94d7b54b8b
commit 5aaaac29a6

View File

@ -6492,10 +6492,11 @@ void Index::batch_embed_fields(std::vector<index_record*>& records,
continue;
}
std::string text = indexing_prefix;
auto embed_from = field.embed[fields::from].get<std::vector<std::string>>();
const auto& embed_from = field.embed[fields::from].get<std::vector<std::string>>();
for(const auto& field_name : embed_from) {
auto field_it = search_schema.find(field_name);
if(document->count(field_name) == 0) {
auto doc_field_it = document->find(field_name);
if(doc_field_it == document->end()) {
continue;
}
if(field_it.value().type == field_types::STRING) {