Updated narrow_queries in backend search to AND queries rather than OR. Thanks to naktinis for the original patch.
This commit is contained in:
parent
8c479019a9
commit
a4281e7cbd
3 changed files with 6 additions and 9 deletions
5
AUTHORS
5
AUTHORS
|
@ -26,9 +26,6 @@ Thanks to:
|
|||
* glassresistor for assistance troubleshooting an issue with boosting a phrase query & a patch to make weighting schemes overridable.
|
||||
* James Addison for helping to debug an intermittent issue with `order_by` and `build_schema`.
|
||||
* Michael Opitz for a patch that enables support for `inmemorydb`.
|
||||
<<<<<<< HEAD
|
||||
* Evgeniy Kirov for a patch that adds `HAYSTACK_XAPIAN_LANGUAGE` used for setting the stemming language.
|
||||
* domasx2 for a patch that explicitly closes the database when not in use.
|
||||
=======
|
||||
* Evgeniy Kirov for a patch that adds `HAYSTACK_XAPIAN_LANGUAGE` used for setting the stemming language.
|
||||
>>>>>>> fb4929854070f88e40896799a09c0781a3d3d562
|
||||
* naktinis for a patch that fixed changes the behaviour of the `narrow_queries` argument of `search` so that queries are ANDed together rather than ORed.
|
||||
|
|
6
setup.py
6
setup.py
|
@ -6,7 +6,7 @@ def read(fname):
|
|||
|
||||
setup(
|
||||
name='xapian-haystack',
|
||||
version='1.1.5beta',
|
||||
version='2.0.0',
|
||||
description="A Xapian backend for Haystack",
|
||||
long_description=read('README.rst'),
|
||||
classifiers=[
|
||||
|
@ -17,8 +17,8 @@ setup(
|
|||
'Framework :: Django',
|
||||
],
|
||||
author='David Sauve',
|
||||
author_email='dsauve@trapeze.com',
|
||||
author_email='david.sauve@bag-of-holding.com',
|
||||
url='http://github.com/notanumber/xapian-haystack',
|
||||
license='GPL3',
|
||||
license='GPL2',
|
||||
py_modules=['xapian_backend'],
|
||||
)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright (C) 2009, 2010 Trapeze
|
||||
|
||||
__author__ = 'David Sauve'
|
||||
__version__ = (2, 0, 0, 'beta')
|
||||
__version__ = (2, 0, 0)
|
||||
|
||||
import time
|
||||
import datetime
|
||||
|
@ -384,7 +384,7 @@ class XapianSearchBackend(BaseSearchBackend):
|
|||
if narrow_queries is not None:
|
||||
query = xapian.Query(
|
||||
xapian.Query.OP_AND, query, xapian.Query(
|
||||
xapian.Query.OP_OR, [self.parse_query(narrow_query) for narrow_query in narrow_queries]
|
||||
xapian.Query.OP_AND, [self.parse_query(narrow_query) for narrow_query in narrow_queries]
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue