| 129 | } |
| 130 | |
| 131 | FlatSparseSearcher::ContextPointer FlatSparseSearcher::create_context() const { |
| 132 | if (state_ != STATE_LOADED) { |
| 133 | LOG_ERROR("Failed to create Context, load container first!"); |
| 134 | return Context::UPointer(); |
| 135 | } |
| 136 | FlatSparseSearcherEntity::Pointer entity = entity_.clone(); |
| 137 | return FlatSparseSearcher::ContextPointer(new FlatSparseContext(this)); |
| 138 | } |
| 139 | |
| 140 | //! Create a new iterator |
| 141 | IndexSearcher::SparseProvider::Pointer |