【问题标题】:ADD content-Type in postgres request?在 postgres 请求中添加内容类型?
【发布时间】:2018-07-17 17:07:18
【问题描述】:

我想通过 zombodb 扩展使用 elasticsearch,所以我在 postgres 中使用这个查询:CREATE INDEX idx_zdb_graduated ON masterview USING zombodb(zdb('masterview', masterview.ctid), zdb(masterview)) WITH (url='http://localhost:9200/' ); 但它有一个这个错误

> ERROR:  rc=406; {"error":"Content-Type header [application/x-www-form-urlencoded] is not supported","status":406}

我搜索了一下,发现如果我使用 curl 连接到 elasticsearch ,我应该使用 -H'Content-Type:application/json' 。但我不知道如何将内容类型添加到我的查询中?

【问题讨论】:

  • 你应该在zombodb repo提出一个关于它的问题
  • 嗨。请通过github.com/zombodb/zombodb 向 ZomboDB 的 github 项目报告此问题,我会为您提供帮助。请在表定义中包含 PG、ES 和 ZDB 版本。

标签: postgresql url elasticsearch service content-type


【解决方案1】:

您可能使用了不受支持的版本的弹性搜索或 postgresql 或 os。 我对 elastisearh 版本比 6 有相同的错误,并将其修复为版本。 In my git repository,使用 debian 9、postgres:9.5 和 elasticsearch:5.6.4 应该可以工作。

【讨论】:

    猜你喜欢
    • 2016-01-01
    • 2017-02-05
    • 2016-04-08
    • 1970-01-01
    • 2020-06-16
    • 2012-04-07
    • 2013-02-20
    • 2011-11-19
    • 2019-08-01
    相关资源
    最近更新 更多