How do i achieve cross join between two types in elasticsearch?
SELECT u.Address,c.locality,jaccard_similarity(u.Address, c.locality) as score FROM users u left join communites c on jaccard_similarity(u.Address, c.locality) >=0.65
How do I achieve the same functionality in Elasticsearch?
There is no way to do that natively in elasticsearch.
You'll have to either use nested objects or do application joins ( doing 2 queries in your application).
The documentation will explain the strategies : https://www.elastic.co/guide/en/elasticsearch/guide/current/relations.html