diff --git a/dbs/meilisearch/.env.example b/dbs/meilisearch/.env.example index 320b38a..4f7a742 100644 --- a/dbs/meilisearch/.env.example +++ b/dbs/meilisearch/.env.example @@ -1,6 +1,6 @@ # Master key must be at least 16 bytes, composed of valid UTF-8 characters MEILI_MASTER_KEY = "" -MEILI_VERSION = "v1.1" +MEILI_VERSION = "v1.1.1" MEILI_PORT = 7700 MEILI_URL = "localhost" MEILI_SERVICE = "meilisearch" diff --git a/dbs/meilisearch/README.md b/dbs/meilisearch/README.md index eb96507..8329e4b 100644 --- a/dbs/meilisearch/README.md +++ b/dbs/meilisearch/README.md @@ -2,7 +2,7 @@ [Meilisearch](https://www.meilisearch.com/docs/learn/what_is_meilisearch/overview) is a fast, responsive RESTful search engine database [built in Rust](https://github.com/meilisearch/meilisearch). The primary use case for Meilisearch is to answer business questions that involve typo-tolerant and near-instant searching on keywords or phrases, all enabled by its efficient indexing and storage techniques. -Code is provided for ingesting the wine reviews dataset into Meilisearch in an async fashion. In addition, a query API written in FastAPI is also provided that allows a user to query available endpoints. As always in FastAPI, documentation is available via OpenAPI. +Code is provided for ingesting the wine reviews dataset into Meilisearch in an async fashion [via this excellent client](https://github.com/sanders41/meilisearch-python-async). In addition, a query API written in FastAPI is also provided that allows a user to query available endpoints. As always in FastAPI, documentation is available via OpenAPI. * All code (wherever possible) is async * [Pydantic](https://docs.pydantic.dev) is used for schema validation, both prior to data ingestion and during API request handling diff --git a/dbs/meilisearch/docker-compose.yml b/dbs/meilisearch/docker-compose.yml index 4c4b031..e5f5c77 100644 --- a/dbs/meilisearch/docker-compose.yml +++ b/dbs/meilisearch/docker-compose.yml @@ -13,7 +13,7 @@ services: ports: - ${MEILI_PORT:-7700}:7700 volumes: - - ./meili_data:/meili_data + - meili_data:/meili_data networks: - wine diff --git a/dbs/meilisearch/requirements.txt b/dbs/meilisearch/requirements.txt index 35d4f39..f48e5ed 100644 --- a/dbs/meilisearch/requirements.txt +++ b/dbs/meilisearch/requirements.txt @@ -1,4 +1,4 @@ -meilisearch-python-async>=1.1.0 +meilisearch-python-async>=1.2.0 pydantic>=1.10.7, <2.0.0 fastapi>=0.95.0, <1.0.0 httpx>=0.24.0 diff --git a/dbs/meilisearch/scripts/bulk_index.py b/dbs/meilisearch/scripts/bulk_index.py index a828262..144acd6 100644 --- a/dbs/meilisearch/scripts/bulk_index.py +++ b/dbs/meilisearch/scripts/bulk_index.py @@ -167,6 +167,7 @@ async def main(files: list[str]) -> None: data = read_jsonl_from_file(file) data = validate(data, Wine, exclude_none=True) tasks.append(do_indexing(index, data, file)) + print(f"Validated data from {Path(file).name} in pydantic") try: # Set id as primary key prior to indexing await asyncio.gather(*tasks)