Removed pyelasticsearch dependency

pull/89/head
Karl Hobley 2014-02-22 14:18:13 +00:00
rodzic 104d5c9a64
commit aea535f6d4
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -1,7 +1,6 @@
from django.db import models
from django.conf import settings
from pyelasticsearch.exceptions import ElasticHttpNotFoundError
from elasticutils import get_es, S
from wagtail.wagtailsearch.backends.base import BaseSearch
@ -70,7 +69,7 @@ class ElasticSearch(BaseSearch):
# Delete old index
try:
self.es.delete_index(self.es_index)
except ElasticHttpNotFoundError:
except:
pass
# Settings
@ -195,7 +194,7 @@ class ElasticSearch(BaseSearch):
# Delete document
try:
self.es.delete(self.es_index, obj.indexed_get_content_type(), doc_id)
except ElasticHttpNotFoundError:
except:
pass # Document doesn't exist, ignore this exception
def search(self, query_string, model, fields=None, filters={}, prefetch_related=[]):