mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-10 08:14:53 +00:00
Added __repr__ method to ElasticSearchQuery
This commit is contained in:
parent
b2844a3225
commit
f73d66908e
1 changed files with 6 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
|||
from __future__ import absolute_import
|
||||
|
||||
import string
|
||||
import json
|
||||
|
||||
from django.db import models
|
||||
|
||||
from elasticsearch import Elasticsearch, NotFoundError, RequestError
|
||||
|
|
@ -8,7 +11,6 @@ from elasticsearch.helpers import bulk
|
|||
from wagtail.wagtailsearch.backends.base import BaseSearch
|
||||
from wagtail.wagtailsearch.indexed import Indexed
|
||||
|
||||
import string
|
||||
|
||||
|
||||
class ElasticSearchQuery(object):
|
||||
|
|
@ -105,6 +107,9 @@ class ElasticSearchQuery(object):
|
|||
}
|
||||
}
|
||||
|
||||
def __repr__(self):
|
||||
return json.dumps(self.to_es())
|
||||
|
||||
|
||||
class ElasticSearchResults(object):
|
||||
def __init__(self, backend, query, prefetch_related=[]):
|
||||
|
|
|
|||
Loading…
Reference in a new issue