首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Solr rebuild_index错误403

Solr rebuild_index错误403
EN

Stack Overflow用户
提问于 2016-09-25 22:29:39
回答 1查看 183关注 0票数 0

我正在Django学习。

我必须为测试应用程序构建搜索引擎。

我有过

search_indexes.py

代码语言:javascript
复制
from haystack import indexes
from .models import Post

class PostIndex(indexes.SearchIndex, indexes.Indexable):
    text = indexes.CharField(document=True, use_template=True)
    publish = indexes.DateTimeField(model_attr='publish')

    def get_model(self):
        return Post

    def index_queryset(self, using=None):
        return self.get_model().published.all()`

我为我的应用程序创建并设置了Solr核心管理。

当我尝试执行python manage.py rebuild_index时,我会得到以下错误:

代码语言:javascript
复制
 raise SolrError(error_message % (resp.status_code, solr_message))
 pysolr.SolrError: Solr responded with an error (HTTP 403): [Reason: None]

并且遵循HTML中的响应(这只是响应的一部分):

代码语言:javascript
复制
<h1>This Page Cannot Be Displayed</h1>
<p>
Based on your organization's security policies, this web site( http://127.0.0.1/solr/blog/update/?commit=true )has been blocked because it has been determined to be a securitythreat to your computer or the organization's network.Access could also be blocked because this request came from anunrecognized or unauthorized machine.
</p>
<p>
If you have questions, please contactyour organization's network administrator and provide the codes shown below.</p>
</div>

我有“博客”应用程序。我有Post模型。我在博客应用程序目录中创建了blog/search/indexes/ blog /post_text.txt

solr中博客核心管理的图像

有什么帮助吗?

谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-08 16:28:42

问题是我的代理设置。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39692426

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档