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.

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

报告相同问题?

悬赏问题

  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应
  • ¥15 matlab基于pde算法图像修复,为什么只能对示例图像有效
  • ¥100 连续两帧图像高速减法
  • ¥15 如何绘制动力学系统的相图
  • ¥15 对接wps接口实现获取元数据
  • ¥20 给自己本科IT专业毕业的妹m找个实习工作