Is it possible to perform a K- nearest neighbor query for an N dimensional data in Druid ?

If it is available great could you please point me to the documentation

If not is it possible to implement it in druid ?

If you could give me an overview of what has to be done I’d be glad to contribute as I’m looking for a similar solution.

Hi Vishnu, you can look at building indexed data structures for faster nearest neighbor queries, for example you can look into building an indexed kd-tree. You can look at how we build r-trees for spatial filtering (https://github.com/metamx/bytebuffer-collections/tree/master/src/main/java/com/metamx/collections)