【问题标题】:MongoDB full text search with haskell driver使用 haskell 驱动程序进行 MongoDB 全文搜索
【发布时间】:2013-07-18 17:08:58
【问题描述】:

有没有可能用haskell驱动使用mongoDB的全文搜索?

我在 haskell API 中找到了“runCommand”,但它需要一个 Document 作为参数。这对于 mongodb 可以运行的所有其他命令都很好,但是文本命令的语法是: db.collection.runCommand( "text", {search : "something"})

所以我不知道如何将“文本”作为 Document 前面的第一个参数。

谢谢

【问题讨论】:

    标签: mongodb haskell mongodb-query


    【解决方案1】:

    text-命令可以写成另一种结构:

    { text: your_collection
    , search: your_text
    , filter: your_filter
    , limit: your_limit
    , project: your_projection
    } 
    

    我怀疑,因为所有“runCommand”-action 都具有相同的结构。所以我尝试将该结构应用于文本命令 - 但没有成功。然后我记得aggregate 也有另一个结构并尝试过,但这也不起作用。终于在google group entry of the Java driver找到了答案。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-12
      • 1970-01-01
      • 2017-04-16
      • 2014-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多