Index Tool for Search #107

Merged
zuul merged 17 commits from index_search into main 2023-06-27 07:57:26 +00:00
3 changed files with 163 additions and 5 deletions
Showing only changes of commit a236c3a34c - Show all commits

View File

@ -88,19 +88,20 @@ def main():
data=data
)
def filter_docs(metadata):
allowed_types = ["umn", "api-ref", "dev"]
metadata['docs'] = [doc for doc in metadata['docs'] if doc['type'] in allowed_types]
metadata['docs'] = [doc for doc in metadata['docs']
if doc['type'] in allowed_types]
return metadata
def getData(environment, all_doc_types):
metadatadata = metadata.service_types_with_doc_types(
environment=environment
)
print(all_doc_types)
if not all_doc_types:
final_data = filter_docs(metadatadata)
print(final_data)
return final_data