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

Change field index to not analyzed #539

Closed
chiragvaya opened this issue Aug 25, 2015 · 1 comment
Closed

Change field index to not analyzed #539

chiragvaya opened this issue Aug 25, 2015 · 1 comment

Comments

@chiragvaya
Copy link

Hi

I am indexing data to ES through hive by using the query :

CREATE EXTERNAL TABLE json2 ( time_id_1 STRING, acnt_nm) STORED BY 'org.elasticsearch.hadoop.hive.EsStorageHandler' TBLPROPERTIES('es.resource' = 'es_testing/test', 'es.nodes' = 'xxx');

insert overwrite table json2 select time_id_1 , acnt_nm from table_x;

I want my string column acnt_nm to be "not analyzed".
I found out there is a way of doing this through Mapping API by setting the "index": "not_analyzed"

I know this can be done through explicit mapping. But that is very cumbersome as i will have to do that every time before indexing any new data.
But can i do the same through the hive external table creation command ?

@costin
Copy link
Member

costin commented Aug 27, 2015

For questions please use the forum not the issue tracker.

And no, such a feature is not supported in the connector for several reasons, the main one being there is no clear hook that can be used across integrations for declaring the mapping. Considering that the mapping is typically a one-time thing, doing it outside the connector is not too difficult and actually recommended.

@costin costin closed this as completed Aug 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants