mirror of
https://github.com/Hopiu/xapian-haystack.git
synced 2026-03-16 22:20:31 +00:00
Configuring 'limit_to_registered_models' according to doc haystack.
This commit is contained in:
parent
79a00865aa
commit
02acc62824
1 changed files with 6 additions and 1 deletions
|
|
@ -566,7 +566,7 @@ class XapianSearchBackend(BaseSearchBackend):
|
|||
def search(self, query, sort_by=None, start_offset=0, end_offset=None,
|
||||
fields='', highlight=False, facets=None, date_facets=None,
|
||||
query_facets=None, narrow_queries=None, spelling_query=None,
|
||||
limit_to_registered_models=True, result_class=None, **kwargs):
|
||||
limit_to_registered_models=None, result_class=None, **kwargs):
|
||||
"""
|
||||
Executes the Xapian::query as defined in `query`.
|
||||
|
||||
|
|
@ -616,6 +616,9 @@ class XapianSearchBackend(BaseSearchBackend):
|
|||
|
||||
database = self._database()
|
||||
|
||||
if limit_to_registered_models is None:
|
||||
limit_to_registered_models = getattr(settings, 'HAYSTACK_LIMIT_TO_REGISTERED_MODELS', True)
|
||||
|
||||
if result_class is None:
|
||||
result_class = SearchResult
|
||||
|
||||
|
|
@ -661,6 +664,8 @@ class XapianSearchBackend(BaseSearchBackend):
|
|||
for spy in facets_spies:
|
||||
enquire.add_matchspy(spy)
|
||||
|
||||
print enquire.get_query()
|
||||
|
||||
matches = self._get_enquire_mset(database, enquire, start_offset, end_offset)
|
||||
|
||||
for match in matches:
|
||||
|
|
|
|||
Loading…
Reference in a new issue