api.solr_utils
Module Contents
Functions
|
|
|
|
|
|
|
|
|
|
|
|
|
Adds a single cui and associated metadata is available in the associated solr search index. |
|
|
|
|
|
Attributes
- api.solr_utils.SOLR_INDEX_SCHEMA
- api.solr_utils.logger
- api.solr_utils._cache_solr_collection_schema_types(collection)
- api.solr_utils.collections_available(cdbs)
- Parameters:
cdbs (List[int]) –
- api.solr_utils._process_result_repsonse(resp)
- Parameters:
resp (Dict) –
- api.solr_utils.search_collection(cdbs, raw_query)
- Parameters:
cdbs (List[int]) –
raw_query (str) –
- api.solr_utils.import_all_concepts(cdb, cdb_model)
- Parameters:
cdb (medcat.cdb.CDB) –
cdb_model (api.models.ConceptDB) –
- api.solr_utils.drop_collection(cdb_model)
- Parameters:
cdb_model (api.models.ConceptDB) –
- api.solr_utils.ensure_concept_searchable(cui, cdb, cdb_model)
Adds a single cui and associated metadata is available in the associated solr search index. Args:
cui: concept unique identifier of the concept to make searchable cdb: the MedCAT CDB where the cui can be found cdb_model: the associated Django model instance for the CDB.
- Parameters:
cdb (medcat.cdb.CDB) –
cdb_model (api.models.ConceptDB) –
- api.solr_utils._upload_payload(update_url, data, collection, commit=False)
- api.solr_utils._concept_dct(cui, cdb, info)
- Parameters:
cui (str) –
cdb (medcat.cdb.CDB) –
info (medcat.cdb.concepts.CUIInfo) –
- api.solr_utils._solr_error_response(resp, error_msg)