store::for_each_term: use field-id
We were trying to convert a field (string) to a xapian prefix back to a field (enum). That's unnecessarily complicated and worse, step 2 won't work.
This commit is contained in:
@ -200,7 +200,7 @@ Parser::Private::process_regex(const std::string& field_str,
|
||||
const auto field{message_field(*id_opt)};
|
||||
const auto prefix{field.xapian_term()};
|
||||
std::vector<std::string> terms;
|
||||
store_.for_each_term(prefix, [&](auto&& str) {
|
||||
store_.for_each_term(field.id, [&](auto&& str) {
|
||||
if (std::regex_search(str.c_str() + 1, rx)) // avoid copy
|
||||
terms.emplace_back(str);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user