[英]Algolia matching exact attribute
When I try to use 当我尝试使用时
restrictSearchableAttributes
using the Javascript client 使用Javascript客户端
I get 我明白了
Invalid setting for restrictSearchableAttributes, attribute "field" is not in attributesToIndex
But I'm saving using the Laravel package and I already set the field for attributesToIndex there? 但是我正在使用Laravel包保存,我已经为attributesToIndex设置了字段?
The restrictSearchableAttributes
can only be used to restrict the searchable attributes to a subset of what your index settings describe. restrictSearchableAttributes
只能用于将可搜索的属性限制为索引设置描述的子集。
Therefore, you need to ensure that field
is in the attributesToIndex
list (in your index settings) before being able to restrict the search on this attribute. 因此,您需要确保该field
位于attributesToIndex
列表中(在索引设置中),然后才能限制对此属性的搜索。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.