{"action":"opened","issue":{"url":"https://api.github.com/repos/django-haystack/django-haystack/issues/1230","labels_url":"https://api.github.com/repos/django-haystack/django-haystack/issues/1230/labels{/name}","comments_url":"https://api.github.com/repos/django-haystack/django-haystack/issues/1230/comments","events_url":"https://api.github.com/repos/django-haystack/django-haystack/issues/1230/events","html_url":"https://github.com/django-haystack/django-haystack/issues/1230","id":96040884,"number":1230,"title":"Haystack AutoQuery is called twice?","user":{"login":"rahmonov","id":9026972,"avatar_url":"https://avatars.githubusercontent.com/u/9026972?v=3","gravatar_id":"","url":"https://api.github.com/users/rahmonov","html_url":"https://github.com/rahmonov","followers_url":"https://api.github.com/users/rahmonov/followers","following_url":"https://api.github.com/users/rahmonov/following{/other_user}","gists_url":"https://api.github.com/users/rahmonov/gists{/gist_id}","starred_url":"https://api.github.com/users/rahmonov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahmonov/subscriptions","organizations_url":"https://api.github.com/users/rahmonov/orgs","repos_url":"https://api.github.com/users/rahmonov/repos","events_url":"https://api.github.com/users/rahmonov/events{/privacy}","received_events_url":"https://api.github.com/users/rahmonov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-20T11:07:00Z","updated_at":"2015-07-20T11:07:00Z","closed_at":null,"body":"I am using ElasticSearch as my backend.\r\n\r\nAfter configuring everything, I created a custom view that inherits from SearchView:\r\n\r\nclass CustomSearchView(SearchView):\r\n    template_name = 'search/search.html'\r\n    form_class = ItemSearchForm\r\n    context_object_name = 'items'\r\n\r\nand urls.py:\r\n\r\nurlpatterns = patterns(\r\n    '',\r\n    url(r'^', CustomSearchView.as_view(), name='search'),\r\n)\r\n\r\nSearch is working fine. However I noticed that every time I do a search, two requests are sent to ElasticSearch. I could see that in elasticsearch_appname_requests.log\r\n\r\nAfter some analysis I found that AutoQuery view from haystack.inputs is being called twice.\r\n\r\nI want to reduce it to one so that there will be no additional pressure on elasticsearch backend.\r\n\r\nWhy is it called twice? How to prevent this from happening?"}}