Source code for swh.search

# Copyright (C) 2019-2020  The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information

import importlib
from typing import TYPE_CHECKING, Any, Dict
import warnings

if TYPE_CHECKING:
    # importing swh.storage.interface triggers the load of 300+ modules, so...
    from swh.search.interface import SearchInterface


SEARCH_IMPLEMENTATIONS = {
    "elasticsearch": ".elasticsearch.ElasticSearch",
    "remote": ".api.client.RemoteSearch",
    "memory": ".in_memory.InMemorySearch",
}