doukanwen4114 2017-04-26 15:26
浏览 55
已采纳

是否可以使用Algolia对多索引搜索的结果进行排名?

I'm using Algolia API with PHP and currently I have 4 indices (one per DB table as they recommend).

When submitting a search I'm doing a multipleQueries query to search all indices but the problem is that in the result set each index is ranked and returns its own facets which then have to be combined somehow before being displayed.

Is there a way to specify a global ranking strategy when searching to avoid doing that manually after getting the results?

  • 写回答

1条回答 默认 最新

  • dtwr2012 2017-04-27 15:34
    关注

    Going for the "1 index per DB table" may not the ultimate answer, and depends on your specific use case, and on the UI you intend to provide.

    In the case of movies and actors, you can't really expect to provide a unique UI for both: it's unlikely that facets you can apply to a movie can also be applied to an actor. In that case, separate indexes is the way to go.

    If you intend to merge the results or use a single set of facet values for all your indexes, then you should probably go for a unique, big, index. Because Algolia is schema-less, you don't even have to have all your records having strictly the same structure.

    If you insist on staying on separate indices, unfortunately, there is no way to do so without recoding a significant part of the engine ranking strategy inside your front-end.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)
  • ¥15 AIC3204的示例代码有吗,想用AIC3204测量血氧,找不到相关的代码。