Пример #1
0
def metasearch():
    # user_service = UserService(CSV(USER_DATA_FILE))
    # geo_service = GeoService(CSV(GEO_DATA_FILE))
    search = SearchInShardsService(shards=[
        SimpleSearchService(CSV(file)) for file in SEARCH_DOCUMENTS_DATA_FILES
    ])
    return MetaSearchService(search)
Пример #2
0
def main():
    shard2_service = SimpleSearchService(CSV(SEARCH_DOCUMENTS_DATA_FILES2))
    server = ChildSearchServer('shard2', shard2_service)
    server.run_server(port=8012, debug=True)
Пример #3
0
def main():
    geo_service = GeoService(CSV(GEO_DATA_FILE))
    server = GeoServer('geosearch', geo_service=geo_service)
    server.run_server(debug=True)
Пример #4
0
def main():
    user_service = UserService(CSV(USER_DATA_FILE))
    server = UserServer('usersearch', user_service=user_service)
    server.run_server(debug=True)