Error while adding new documents to Azure Search index
<p>I have an index with a couple of fields of type <code>Edm.String</code> and <code>Collection(Edm.String)</code>. I want to have another index with the same fields plus another field of type <code>Edm.Double</code>. When I create such an index and try to add the same values (plus the newly added <code>Edm.Double</code> value) as I did to the first index, I'm getting the following error:</p>

<pre><code>{
    "error": {
        "code": "",
        "message": "The request is invalid. Details: parameters : An unexpected 'StartArray' node was found when reading from the JSON reader. A 'PrimitiveValue' node was expected.\r\n"
    }
}
</code></pre>

<p>Does anyone know what this error means? I tried looking for it on the Internet but I couldn't find anything related to my situation. A sample request I'm sending to the new index looks like this:</p>

<pre><code>POST https://myservicename.search.windows.net/indexes/newindexname/docs/index?api-version=2016-09-01

{
    "value": [{
        "@search.action": "upload",
        "keywords": ["red", "lovely", "glowing", "cute"],
        "name": "sample document",
        "weight": 0.5,
        "id": "67"
    }]
}
</code></pre>

<p>The old index is the same but it doesn't have the "weight" parameter.</p>

<p>Edit: I created the index using the portal, so I don't have the exact JSON to create the index, but the fields are roughly like this:</p>

<pre><code>   Field                     Type                            Attributes        Analyzer
---------------------------------------------------------------------------------------
      id               Edm.String                      Key, Retrievable   
    name               Edm.String   Searchable, Filterable, Retrievable   Eng-Microsoft
keywords   Collection(Edm.String)   Searchable, Filterable, Retrievable   Eng-Microsoft
  weight               Edm.Double                  Filterable, Sortable
</code></pre>