3

当我尝试使用

 restrictSearchableAttributes

使用 Javascript 客户端

我明白了

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

但是我正在使用 Laravel 包进行保存,并且我已经在那里设置了 attributesToIndex 字段?

4

1 回答 1

7

restrictSearchableAttributes只能用于将可搜索属性限制为索引设置描述的子集。

因此,您需要确保它fieldattributesToIndex列表中(在您的索引设置中),然后才能限制对该属性的搜索。

于 2015-09-25T16:56:40.527 回答