0

I have a Cosmos DB collection being indexed and searched by Azure Search. After setup, everything works well and I'm able to add a few documents to Cosmos DB and have the indexer automatically run and index the newly added documents.

However, I'm seeing after a few documents are added (random number), Azure Search Indexer detects json values as Edm.Double instead of Edm.Int64, which then causes the indexer to constantly fail. The values have all been verified to be of type Edm.Int64 still. Also, the way the values are updated are through the C# .Net SDK, using a property of type UInt64.

Here are some values in my Cosmos DB collection that initially work, but then Azure Search will randomly detect one as an Edm.Double instead of Edm.Int64. 1499746035741128 1499752659822592 1499752939110661 1499753827614475 1499970126403840 1499970590815128 1499970842400644 1499971371510025 1499972760675685 1499972969962006 1499973086735836 1499973302072392 1499976826748983

Nimesh
  • 1
  • 1
  • Can you please include the DataSource definition that you're using? Specifically the query that you've specified to pull data – Jesse Carter Jul 13 '17 at 20:23
  • I didn't manually create a DataSource. The connection was setup via Azure Portal by going into the Cosmos DB panel and clicking "Add Azure Search." Looking in the Azure Search panel now, the DataSource doesn't give me much information. The indexer has the appropriate types next to the fields. – Nimesh Jul 13 '17 at 21:10
  • Perhaps, it is not related to azure search servie. It seems that related to C#.Net SDK, please refer to another [SO thread](https://stackoverflow.com/questions/45020454/int-value-is-different-when-querying-via-c-sharp-vs-azure-portal-query-explorer). I have reported it to Azure Cosmos DB team. – Tom Sun - MSFT Jul 14 '17 at 01:48
  • @TomSun-MSFT That could very well be the issue. I'm using Azure's Cosmos DB -> Azure Search web portal, which I'm assuming is using C# .NET SDK to actually monitor and add the documents to the indexer. It seems I have to keep resetting the indexer when it gets into a failed state. I'll follow your other SO thread to see if this issue is resolved with that. – Nimesh Jul 14 '17 at 19:33
  • Another bug manifesting itself in the same way: https://stackoverflow.com/questions/37022629/azure-search-indexer-failing-with-error-message The linked bug is for SQL indexer, not Cosmos DB. – Nimesh Jul 24 '17 at 22:01
  • @Nimesh, the SQL indexer issue you linked is unrelated and has been resolved a long time ago. – Eugene Shvets Jul 25 '17 at 06:43

0 Answers0