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)
def main(): shard2_service = SimpleSearchService(CSV(SEARCH_DOCUMENTS_DATA_FILES2)) server = ChildSearchServer('shard2', shard2_service) server.run_server(port=8012, debug=True)
def main(): geo_service = GeoService(CSV(GEO_DATA_FILE)) server = GeoServer('geosearch', geo_service=geo_service) server.run_server(debug=True)
def main(): user_service = UserService(CSV(USER_DATA_FILE)) server = UserServer('usersearch', user_service=user_service) server.run_server(debug=True)