Skip to content

Add command to create indexes without importing documents #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 17, 2021

Conversation

norkunas
Copy link
Collaborator

@norkunas norkunas commented Nov 26, 2021

Pull Request

What does this PR do?

Allows to create configured indexes without importing documents.
Sometimes it's convenient to create only indexes without importing before to test if app flow just works in case you have many entities and the device is slow to import documents.

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

@norkunas norkunas force-pushed the create-indexes-command branch 6 times, most recently from 4b7ef2f to f7b6dbe Compare November 26, 2021 09:53
@norkunas norkunas force-pushed the create-indexes-command branch from f7b6dbe to 2fd7a75 Compare November 26, 2021 09:54
@alallema
Copy link
Contributor

Hi @norkunas,
Thank you so much for contributing to Meilisearch ❤️!
@curquiza is on holiday and will review your PR once they are back.

@norkunas
Copy link
Collaborator Author

norkunas commented Dec 8, 2021

friendly ping @curquiza :)

@curquiza
Copy link
Member

curquiza commented Dec 17, 2021

Hello @norkunas, sorry for the delay! Thank you so much for this improvement in our repository!

Before I merge, can you give me an example to use your new command (or multiple examples if there are many ways to use your command) so that I can complete the docs accordingly :)

@norkunas
Copy link
Collaborator Author

Same way as other commands:

bin/console create - will iterate through all configured indexes and will try to create them
bin/console create --indices=posts,tags will only try to create posts and tags indexes

:)

@curquiza
Copy link
Member

If I understand well, this is:

php bin/console meili:index --indices=posts,comments

to create posts and comments indexes. Do I miss something?

@curquiza
Copy link
Member

You were faster than me! thanks for your answer!

@norkunas
Copy link
Collaborator Author

Yes, you are correct :)
I'm not sure about the aggregator part, which I just adapted from the import command

@curquiza
Copy link
Member

bors try

bors bot added a commit that referenced this pull request Dec 17, 2021
@bors
Copy link
Contributor

bors bot commented Dec 17, 2021

try

Build failed:

@norkunas
Copy link
Collaborator Author

I can submit a PR to fix unrelated failing tests

@curquiza
Copy link
Member

It would be awesome! 🙏 thanks!

@norkunas
Copy link
Collaborator Author

@curquiza #142

Copy link
Member

@curquiza curquiza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @norkunas

bors merge

@bors
Copy link
Contributor

bors bot commented Dec 17, 2021

@bors bors bot merged commit 071c092 into meilisearch:main Dec 17, 2021
@curquiza curquiza added the enhancement New feature or request label Dec 17, 2021
@norkunas norkunas deleted the create-indexes-command branch December 20, 2021 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants