Commit 115e097
committed
PYCBC-1694: Allow setting min=0 in DisjunctionQuery
Motivation
==========
The server accepts disjunction queries with min=0. In the case of a standalone DisjunctionQuery, it is equivalent to the default (min=1). When used as part of a BooleanQuery, min=0 means that the disjuncts only affect the scoring.
Change
======
Update DisjunctionQuery.min setter to only raise an error if min is negative.
Results
=======
Relevant FIT test passes (SearchTest.booleanQueryNotMatchMin0)
Change-Id: I17b13522ef2ac3b603c5e4f568771161fd0c92a5
Reviewed-on: https://review.couchbase.org/c/couchbase-python-client/+/230750
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Jared Casey <jared.casey@couchbase.com>1 parent d8fa031 commit 115e097
2 files changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
865 | | - | |
| 865 | + | |
866 | 866 | | |
867 | 867 | | |
868 | | - | |
869 | | - | |
| 868 | + | |
| 869 | + | |
870 | 870 | | |
871 | 871 | | |
872 | 872 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| |||
0 commit comments