Permalink
Browse files

Updated narrow_queries in backend search to AND queries rather than O…

…R. Thanks to naktinis for the original patch.
  • Loading branch information...
1 parent 8c47901 commit a4281e7cbd4209c729fa717fd344f87206390c45 @notanumber committed May 28, 2012
Showing with 6 additions and 9 deletions.
  1. +1 −4 AUTHORS
  2. +3 −3 setup.py
  3. +2 −2 xapian_backend.py
View
@@ -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.
View
@@ -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 @@ def read(fname):
'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'],
)
View
@@ -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 @@ def search(self, query, sort_by=None, start_offset=0, end_offset=None,
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]
)
)

0 comments on commit a4281e7

Please sign in to comment.