I have been using the Azure Cognitive Search to create the indexes for two or more tables and using the API in .Net code to retrieve the values from the tables.
Now I am trying to join two or more tables as a single index and use that index in the code.
I know how to create different indexes for different tables separately. Now I want to know how to join two or more tables in Azure Cognitive Search.
Is there any way to join the tables in Azure Cognitive Search? If it is possible please, let me know how to do it.
2
Answers
You cannot join data in Azure Cognitive Search. It’s a common question and there are some good answers on this already. Ref.:
Search data in multiple tables
and
Azure search – Indexing many-to-many
A common solution is to flatten the data by joining it on index time. There are several ways to join the data as part of indexing.
Flattening data so that the records you index resemble the records you expect back from search is a common technique used in search implementations.
Just adding to Dan’s answer.
Join is not supported in Azure Cognitive Search for index results.
If your requirement fits, you may try joining the data source tables contents before having them indexed and use a single index that has the joined results.
Table joining is not relevant pattern for Search Analytics solutions even in the cases that it is supported, typically it is not efficient.
Followed-up from your Microsoft Q&A thread.