Djano:Solr rebuild_index 错误 403
Djano:Solr rebuild_index error 403
我正在学习 Django。
我必须为测试应用程序构建搜索引擎。
我有
search_indexes.py
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
时出现此错误:
raise SolrError(error_message % (resp.status_code, solr_message))
pysolr.SolrError: Solr responded with an error (HTTP 403): [Reason: None]
以及在HTML中的回复(这只是回复的一部分):
<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
image of blog core admin in solr
有什么帮助吗?
谢谢。
问题出在我的代理设置上。
我正在学习 Django。
我必须为测试应用程序构建搜索引擎。
我有
search_indexes.py
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
时出现此错误:
raise SolrError(error_message % (resp.status_code, solr_message))
pysolr.SolrError: Solr responded with an error (HTTP 403): [Reason: None]
以及在HTML中的回复(这只是回复的一部分):
<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
image of blog core admin in solr
有什么帮助吗?
谢谢。
问题出在我的代理设置上。