(self, client)
| 426 | |
| 427 | @pytest.mark.redismod |
| 428 | def test_stopwords(self, client): |
| 429 | client.ft().create_index((TextField("txt"),), stopwords=["foo", "bar", "baz"]) |
| 430 | client.hset("doc1", mapping={"txt": "foo bar"}) |
| 431 | client.hset("doc2", mapping={"txt": "hello world"}) |
| 432 | self.waitForIndex(client, getattr(client.ft(), "index_name", "idx")) |
| 433 | |
| 434 | q1 = Query("foo bar").no_content() |
| 435 | q2 = Query("foo bar hello world").no_content() |
| 436 | res1, res2 = client.ft().search(q1), client.ft().search(q2) |
| 437 | if expects_resp2_shape(client) or expects_unified_shape(client): |
| 438 | assert 0 == res1.total |
| 439 | assert 1 == res2.total |
| 440 | elif expects_resp3_shape(client): |
| 441 | assert 0 == res1["total_results"] |
| 442 | assert 1 == res2["total_results"] |
| 443 | |
| 444 | @pytest.mark.redismod |
| 445 | def test_filters(self, client): |
nothing calls this directly
no test coverage detected