2

I have a problem with Azure Search and a CosmosDB with ShardKey and MongoAPI. My AzureSearchIndexer fills my AzureSearch index with 180,000 records, but all properties are null. Therefore, I believe that my database connection works but somehow the wrong data is selected.

I would expect the 180000 records but with the respective properties.

Thomas
  • 216
  • 3
  • 8
  • How are you populating the data? Please share any code that you've written to accomplish that. – Gaurav Mantri May 27 '19 at 10:21
  • I don´t have any code. I only use the Azure portal. – Thomas May 27 '19 at 10:23
  • Based on the documentation here: https://learn.microsoft.com/en-us/azure/search/search-howto-index-cosmosdb, there's no support for Mongo API on portal as it is in preview. My guess is that the portal assumes that you're using SQL API instead of Mongo API and that could be the reason for missing data. – Gaurav Mantri May 27 '19 at 10:27

1 Answers1

0

As Gaurav mentioned, Mongo API is not yet supported in the portal, so you need to use the REST API directly to create a Mongo datasource. Remember to include "ApiKind=MongoDb" in the credentials connection string in the Create a data source section here.

After creating the Mongo datasource with REST API, you can choose to create the index and indexer with REST API as well, or you can use the portal Import data with your existing datasource.

8163264128
  • 747
  • 4
  • 8