【发布时间】:2021-05-06 16:34:35
【问题描述】:
在 SOLR 上获取 GET 请求错误请求大于 20 MB 或标头太大。请缩小您的请求并重试,或联系 support@websolr.com 并提供您的请求样本以获得进一步帮助。
下面的示例请求:
removing curl request due to security reason
回应:
HTTP/2 413
date: Thu, 06 May 2021 16:25:31 GMT
content-type: application/json
content-length: 218
{"code":413,"message":"Request is larger than 20 MB or headers are too large. Please reduce the size of your request and try again, or contact support@websolr.com with a sample of your request for further assistance."}
我不确定请求如何超过 20MB。也不发送任何标题。
【问题讨论】:
-
This answer 说 Apache 有
a server URL length limit of approximately 4,000 characters, after which Apache produces a "413 Entity Too Large" error您的查询字符串超过 8,000 个字符,所以这可能导致错误? -
查询 Solr 时可以使用 HTTP POST(而不是 GET)。这将允许您绕过 4K 限制。
标签: solr sunspot sunspot-rails sunspot-solr websolr