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

Pig usage for for read different from write leads to confusion #159

Closed
smayzak opened this Issue Mar 3, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@smayzak
Copy link

commented Mar 3, 2014

When Writing data to Elasticsearch from PIG you typically define the storage Alias up front ala DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage();
This is great and makes things easier to work with later in the script.
For reads/queries however the syntax is different and can lead to confusion. eg. if you do this:
DEFINE EsStorage org.elasticsearch.hadoop.pig.EsStorage(); A = LOAD 'index/type' USING EsStorage('es.query=?q=me*');
You will get back all results from the default query of match_all and not the correct matches the correspond to the intended query of ?=me*.

Is there a way to make it work like the second example?

@costin costin added doc and removed bug labels Apr 28, 2014

@costin

This comment has been minimized.

Copy link
Member

commented Apr 28, 2014

Not as far as I can tell - it looks like Pig simply ignores the constructor argument and replaces the definition in place, overriding any arguments passed to it. Whether this is on purpose or not remain to be seen but unless Pig changes the behaviour, there's not much es-hadoop can achieve.

@costin costin closed this Apr 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.