代码之家  ›  专栏  ›  技术社区  ›  JapSeyz

使用Algolia搜索特定属性(列)

  •  1
  • JapSeyz  · 技术社区  · 8 年前

    我很难想出怎么做。我正在使用PHP SDK,我已经设法将其切面化,但这只会返回 facetHits ,具有命中值,但我仍然需要来自模型的数据。

    1 回复  |  直到 8 年前
        1
  •  5
  •   Haroen Viaene Olintonatiuh    8 年前

    你必须改变 searchableAttributes .

    $index->setSettings([
      'searchableAttributes' => [
        'name',
      ]
    ]);
    

    the api reference the guide for searchable attributes

    推荐文章