Closed karolyi closed 1 year ago
@claudep hey, can we pick up some pace here please?
I can remove the release, but I have no idea what you mean when you talk about the regression tests.
What I know though is, before the mentioned change in the commit, I could excloude id
s, and now I can't.
I created a test for myself though (in my private system) that tests for this, maybe this can help:
from django.test.testcases import TestCase
from haystack.query import SearchQuerySet
class HaystackXapianBackendTestCase(TestCase):
'Testing haystack with xapian backend.'
def test_exclude_by_id(self):
'Test if the ID field is not phrased.'
# See https://github.com/notanumber/xapian-haystack/pull/232
sqs = SearchQuerySet().exclude(id__in=['testing123', 'testing456'])
expected = \
'Query((<alldocuments> AND_NOT (Qtesting123 OR Qtesting456)))'
self.assertEqual(first=str(sqs.query.build_query()), second=expected)
Yes, this is a good start. Now you will have to include that test somewhere in https://github.com/notanumber/xapian-haystack/tree/master/tests/xapian_tests/tests.
Alright, I can do that, if you can promise a timely release.
Depends on what you call "timely", do not forget we are volunteers!
do not forget we are volunteers!
yeah, so am I. good news: I've added the test, reverted the version bump, and squashed the commits into one single, clean commit. tests are running, we should be good to go!
Nice, now all I need is a release.
Is that in your power to do?
See PR #233
Hey,
somewhere around 8568e49b8f350ea3ce1358fad014c40b84f087b6 an exclusion has been added to
django_ct
with an__exact
search. I need to add the other django internal fields excluded from text searches as well.In my use case I
.exclude(
some IDs for which I search for with the internalid
field, that is a text field and did get escaped as a phrase because of that. My code usesSearchQuerySet.exclude(id__list=['id_1', 'id_2']
which in the current state will not work.These commits are about that, and also about preparing a new release. Please do a release ASAP, as I need these changes and can't use the official packages until this gets merged. I'm using my on gitea mirror for now, but would like to get back to using the official packages.