【问题标题】:Spring Data mongodb hashed indexSpring Data mongodb 哈希索引
【发布时间】:2014-12-17 17:28:15
【问题描述】:

我需要在字符串类型的 mongo 集合中索引一列,但具有巨大的价值。我倾向于使用Hashed Index,但不知道如何标记索引以在 Spring Data - Mongo API 中使用哈希。

我当前创建索引的代码:

mongo.indexOps('mycollection').ensureIndex(new Index().on('names', Sort.Direction.ASC))

【问题讨论】:

    标签: mongodb spring-data-mongodb


    【解决方案1】:

    似乎有一个开放请求,要求提供创建散列索引的注释。我找到了这个 Jira:https://jira.spring.io/browse/DATAMONGO-1183

    我会尝试通过mongoOperations.indexOps()...解决这个问题

    【讨论】:

      猜你喜欢
      • 2019-08-29
      • 1970-01-01
      • 2013-12-05
      • 2019-01-28
      • 1970-01-01
      • 2016-07-10
      • 1970-01-01
      • 2012-04-10
      • 2023-03-22
      相关资源
      最近更新 更多