2015-09-25 84 views
3

当我尝试使用JavaScript客户端Algolia匹配确切属性

我得到

Invalid setting for restrictSearchableAttributes, attribute "field" is not in attributesToIndex 

使用

restrictSearchableAttributes 

但是我使用Laravel包保存和我已经设置字段为attributesToIndex吗?

回答

7

restrictSearchableAttributes只能用来搜索的属性限制的索引设置描述一下一个子集。

因此,您需要确保fieldattributesToIndex列表(在你的索引设置)能够限制该属性搜索前。

+3

我忘了打电话给setSettings()在后端。非常感谢。现在正在工作。 –