@Suresh Rajamani I wanted to expand upon the great answer provided by @Vahid Ghafarpour to provide you with a sample.
Yes, you can search all models using a single Azure Cognitive Search service. You can create multiple indexes, each with its own schema, and then search across all of them using a single search query.
To achieve this, you can create a search index for each of your data sources with its own schema. Then, you can use the Azure Cognitive Search REST API to issue a search query that searches across all of your indexes. You can also use the Azure Search .NET SDK to issue search queries programmatically.
Here is an example of how you can search across multiple indexes using the REST API:
POST https://[service name].search.windows.net/indexes/*/docs/search?api-version=[api-version]
Content-Type: application/json
api-key: [admin key]
{
"search": "your search query",
"searchFields": "field1,field2,field3",
"queryType": "full",
"count": true,
"skip": 0,
"top": 10
}
In this example, you would replace [service name]
with the name of your Azure Cognitive Search service, [api-version]
with the version of the REST API you are using, and [admin key]
with your Azure Cognitive Search admin key. You would also replace field1
, field2
, and field3
with the names of the fields you want to search across.