| 1031 | } |
| 1032 | |
| 1033 | std::optional<Index*> NodeTable::getIndex(const std::string& name) const { |
| 1034 | for (auto& index : indexes) { |
| 1035 | if (StringUtils::caseInsensitiveEquals(index.getName(), name)) { |
| 1036 | if (index.isLoaded()) { |
| 1037 | return index.getIndex(); |
| 1038 | } |
| 1039 | throw RuntimeException(std::format( |
| 1040 | "Index {} is not loaded yet. Please load the index before accessing it.", name)); |
| 1041 | } |
| 1042 | } |
| 1043 | return std::nullopt; |
| 1044 | } |
| 1045 | |
| 1046 | void NodeTable::serialize(Serializer& serializer) const { |
| 1047 | nodeGroups->serialize(serializer); |
no test coverage detected