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
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.
|
* 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`.
|
* 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`.
|
* 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.
|
* 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.
|
* domasx2 for a patch that explicitly closes the database when not in use.
|
||||||
=======
|
* 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.
|
||||||
* Evgeniy Kirov for a patch that adds `HAYSTACK_XAPIAN_LANGUAGE` used for setting the stemming language.
|
|
||||||
>>>>>>> fb4929854070f88e40896799a09c0781a3d3d562
|
|
||||||
|
|
6
setup.py
6
setup.py
|
@ -6,7 +6,7 @@ def read(fname):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='xapian-haystack',
|
name='xapian-haystack',
|
||||||
version='1.1.5beta',
|
version='2.0.0',
|
||||||
description="A Xapian backend for Haystack",
|
description="A Xapian backend for Haystack",
|
||||||
long_description=read('README.rst'),
|
long_description=read('README.rst'),
|
||||||
classifiers=[
|
classifiers=[
|
||||||
|
@ -17,8 +17,8 @@ setup(
|
||||||
'Framework :: Django',
|
'Framework :: Django',
|
||||||
],
|
],
|
||||||
author='David Sauve',
|
author='David Sauve',
|
||||||
author_email='dsauve@trapeze.com',
|
author_email='david.sauve@bag-of-holding.com',
|
||||||
url='http://github.com/notanumber/xapian-haystack',
|
url='http://github.com/notanumber/xapian-haystack',
|
||||||
license='GPL3',
|
license='GPL2',
|
||||||
py_modules=['xapian_backend'],
|
py_modules=['xapian_backend'],
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# Copyright (C) 2009, 2010 Trapeze
|
# Copyright (C) 2009, 2010 Trapeze
|
||||||
|
|
||||||
__author__ = 'David Sauve'
|
__author__ = 'David Sauve'
|
||||||
__version__ = (2, 0, 0, 'beta')
|
__version__ = (2, 0, 0)
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import datetime
|
import datetime
|
||||||
|
@ -384,7 +384,7 @@ class XapianSearchBackend(BaseSearchBackend):
|
||||||
if narrow_queries is not None:
|
if narrow_queries is not None:
|
||||||
query = xapian.Query(
|
query = xapian.Query(
|
||||||
xapian.Query.OP_AND, 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 New Issue