Я занимаюсь обучением в Django.Djano: Solr rebuild_index error 403
Мне нужно построить поисковую систему для тестового приложения.
У меня есть
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
модель. Я создал в блоге каталоги приложений блог/поиск/индексов/блог/post_text.txt
image of blog core admin in solr
Любая помощь?
Спасибо.
Ребята, проблема была в настройках прокси. – milutinke