Skip to content

Commit

Permalink
Merge pull request #13 from prrao87/meilisearch
Browse files Browse the repository at this point in the history
Update Meilisearch version and docker files
  • Loading branch information
prrao87 authored Apr 18, 2023
2 parents 9449c47 + 708ecdf commit 1b23cd6
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dbs/meilisearch/.env.example
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion dbs/meilisearch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dbs/meilisearch/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ services:
ports:
- ${MEILI_PORT:-7700}:7700
volumes:
- ./meili_data:/meili_data
- meili_data:/meili_data
networks:
- wine

Expand Down
2 changes: 1 addition & 1 deletion dbs/meilisearch/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions dbs/meilisearch/scripts/bulk_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1b23cd6

Please sign in to comment.