当我将它推送到algolia时,本地数据库整数数据获取字符串

时间:2016-02-01 12:48:00

标签: algolia

记录我推送到algolia显示为字符串,但它在我的本地数据库中是一个整数。

1 个答案:

答案 0 :(得分:1)

嗯,你没有放任何代码所以我认为你的错误在这里:Algolia是无模式的。你必须这样做in this page :

{
  "objectID": 42,             // record identifier
  "title": "Breaking Bad",    // string attribute
  "episodes": [               // array of strings attribute
    "Crazy Handful of Nothin'",
    "Gray Matter"
  ],
  "like_count": 978,          // integer attribute
  "avg_rating": 1.23456,      // float attribute
  "featured": true,           // boolean attribute
  "actors": [                 // nested objects attribute
    {
      "name": "Walter White",
      "portrayed_by": "Bryan Cranston"
    },
    {
      "name": "Skyler White",
      "portrayed_by": "Anna Gunn"
    }
  ]
}
相关问题