Hi,
I'd like to compare addresses from 2 different indices using a join function and fuzzymatch. In SQL it would look something like this:
SELECT my.com_name AS MyName, cust.customer_name AS CustName,
my.com_address AS MyAddress, cust.customer_address AS CustAdress,
my.com_city AS MyCity, cust.customer_city AS CustCity,
my.com_zip AS MyZIP, cust.customer_zip AS CustZIP
FROM customer.customers cust JOIN my.customers my
ON metaphone(my.com_name, 5) = metaphone(cust.customer_name, 5)
AND levenshtein(cust.customer_name, my.com_name) < 5
AND levenshtein(cust.customer_zip, my.com_zip) < 2;
Is there even a possibility with 2 indices? And if, better as a nested or has_child/has_parent query?