Skip to content
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

Option to skip document count #21

Open
parberge opened this issue Jan 8, 2016 · 11 comments
Open

Option to skip document count #21

parberge opened this issue Jan 8, 2016 · 11 comments

Comments

@parberge
Copy link

parberge commented Jan 8, 2016

I use this tool to merge several indices into a new index, which will ofc mean that the document count will always be NOT EQUAL, which is intended.

This process is a bit slow for me, so I would like the option to skip it.

@bklang
Copy link
Member

bklang commented Jan 8, 2016

Sounds like a reasonable request. Would you be willing to submit a pull request with that change?

@parberge
Copy link
Author

parberge commented Jan 8, 2016

I can give it a shot

On Fri, Jan 8, 2016, 15:58 Ben Klang [email protected] wrote:

Sounds like a reasonable request. Would you be willing to submit a pull
request with that chagne?


Reply to this email directly or view it on GitHub
#21 (comment)
.

@parberge
Copy link
Author

I don't really know ruby (the syntax is fairly easy to understand coming from python), but the problem for me is that I don't know how gems works so I can't test my local edit, and a quick search didn't yield in any straight answers ( and no, I didn't spend a lot of time searching :)).

If there is an easier way (e.g edit the es-reindex.rb and run it) please let me know.

@benlangfeld
Copy link
Member

Roughly this, @peerster:

  • Checkout this repository
  • gem install bundler && bundle install to install dependencies
  • Make your edits
  • bundle exec bin/es-reindex ...

Of course you can also run the test suite: bundle exec rake.

@parberge
Copy link
Author

@benlangfeld Thanks.

@JustinAiken
Copy link
Member

You'll need to edit a few files:

  • lib/es_reindex.rb - Add the conditional to skip the copy if the option is set, add the option
  • lib/es_reindex/args_parser.rb - If you want the option available from the command line, add it here
  • /spec/es-reindex/args_parser_spec.rb - If you add the CLI option, add a spec for it

@parberge
Copy link
Author

@JustinAiken Did add my option to those files, but running es-reindex -h don't show my defined option. Anything else I'm missing? Maybe I can't call the script via /usr/local/bin/es-reindexwithout doing moar stuff?

@parberge
Copy link
Author

Just realized that elasticsearch have reindex helper module in python. I will use that instead.

Leaving the issue open, but feel free to close it.

@benlangfeld
Copy link
Member

If you read my instructions, you'll see what's wrong.

@parberge
Copy link
Author

@benlangfeld Ah. Well, I won't continue anyways, but I appreciate the help.

@benlangfeld
Copy link
Member

You were literally 10 seconds from being done, but ok...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants