【问题标题】:Facing error while accessing cassandra data through Solr in DSE在 DSE 中通过 Solr 访问 cassandra 数据时遇到错误
【发布时间】:2018-08-25 02:00:37
【问题描述】:

当我在 solr(separate db) 上发出此查询时,它正在工作。但是当我通过 Solr 查询(我正在使用 DSE)访问 cassandra 数据时,它什么也不返回。它给出了一些与 UserCacheField 相关的错误。那么如何在 solr 查询中启用 UserCacheField 呢?

更新 我的查询是

select * FROM trackfleet_db.location WHERE 
  solr_query='{"facet":{"pivot":"date,latitude,longitude"},"q":":"}' ; 

我收到以下错误

 InvalidRequest: Error from server: code=2200 [Invalid query]
 message="Field cache is disabled, set the field=date to be docValues=true 
 and reindex. Or if the field cache will not exceed the heap usage,
 then place useFieldCache=true in the request parameters."

【问题讨论】:

  • 请分享错误信息和其他信息,例如,查询,DSE版本等。
  • 我的查询是 - select * FROM trackfleet_db.location WHERE solr_query='{"facet":{"pivot":"date,latitude,longitude"},"q":": "}' ;我收到以下错误 InvalidRequest: Error from server: code=2200 [Invalid query] message="Field cache is disabled, set the field=date to docValues=true and reindex. 或者如果字段缓存不会超过堆用法,然后将 useFieldCache=true 放在请求参数中。”
  • 我使用的是 DSE 5.1

标签: datastax datastax-enterprise


【解决方案1】:

最好的方法应该是在给定字段 (date) 上启用 docValues 并重新索引数据。

但是看起来您使用date 类型定义了此字段,而 (per documentation) 不支持 docValues,因此您可能需要将此字段的类型更改为 timestamp(我不是确保您可以使用不同类型的复制字段)。

【讨论】:

    猜你喜欢
    • 2022-01-18
    • 2016-12-07
    • 2014-11-11
    • 1970-01-01
    • 2015-08-24
    • 2017-11-25
    • 1970-01-01
    • 1970-01-01
    • 2018-06-20
    相关资源
    最近更新 更多