Why I need it? :
Without not_analyzed the aggregation query is returning "key_as_string" that I don't want in my resultset. Is there a way to declare type IP as not_analyzed or instruct aggregation not to return "key_as_string" .
I don't quiet understand whats wrong with "key_as_string", you can filter that out on the client side I guess. But you can also use multi fields to store the ip field also as not_analyzed string. If you dont need IP sorting or range querying you could just store the IP as string from the start.
Heres a quick example of how to do this with multi fields in version 2.3, but I guess this is quiet similar in 1.7 if you are still using that version:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.