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 162 additions and 5 deletions
Showing only changes of commit 2dbeaff113 - Show all commits

View File

@ -88,6 +88,10 @@ 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]
return metadata
def getData(environment, all_doc_types):
metadatadata = metadata.service_types_with_doc_types(
@ -95,11 +99,9 @@ def getData(environment, all_doc_types):
)
print(all_doc_types)
if not all_doc_types:
for i, doc in enumerate(metadatadata["docs"], 0):
if doc["type"] not in ["umn", "api-ref", "dev"]:
metadatadata["docs"].pop(i)
print(metadatadata)
return metadatadata
final_data = filter_docs(metadatadata)
print(final_data)
return final_data
def indexData(deleteIndex, hosts, index, username, password, data):