Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Commit

Permalink
feat(search): added django command for listing the meilisearch index
Browse files Browse the repository at this point in the history
  • Loading branch information
gjuro87 authored and aexvir committed Jul 22, 2021
1 parent c206ea8 commit fee0108
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions zoo/globalsearch/management/commands/get_indexes_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import meilisearch
import structlog
from django.conf import settings
from django.core.management.base import BaseCommand

log = structlog.get_logger()


class Command(BaseCommand):
help = "List MeiliSearch indexes"

def handle(self, *args, **options):

client = meilisearch.Client(settings.MEILI_HOST, settings.MEILI_MASTER_KEY)

indexes = client.get_indexes()

log.info(indexes)

0 comments on commit fee0108

Please sign in to comment.