Skip to content

field,sort和filter的需求 #6

@hellokang

Description

@hellokang

服务需要支持对不同类型的document进行索引。目前我们需要支持3种类型的document:user(用户),venue(地点),fabula(故事)。
而每个document又有不同的field。以venue为例,文本类型的field有name,alias,address,pitch等几个字段;另外还有一些数字类型的field,如CityId(所属城市), category(所属类别),AverageCost(平均消费),LikersCount(收藏数),以及需要动态计算的Distance(与当前位置的距离),数字类型的field用在filter和sort。

search时

  • 支持在某个指定的文本field内检索,或是全文的检索。
  • 支持按某些字段的过滤。如只出北京的美食的venue。
  • 排序除了满足相关性外,还需支持按某些字段的排序。如venue按Distance由近到远进行排序。
  • 支持list的功能。及在在没有keyword的情况下,给出满足某种filter和sort条件下的结果集。如列出北京的所有美食类型的venue,再按收藏数从高到低进行排序。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions