(self, client)
| 546 | |
| 547 | @pytest.mark.redismod |
| 548 | def test_example(self, client): |
| 549 | # Creating the index definition and schema |
| 550 | client.ft().create_index((TextField("title", weight=5.0), TextField("body"))) |
| 551 | |
| 552 | # Indexing a document |
| 553 | client.hset( |
| 554 | "doc1", |
| 555 | mapping={ |
| 556 | "title": "RediSearch", |
| 557 | "body": "Redisearch impements a search engine on top of redis", |
| 558 | }, |
| 559 | ) |
| 560 | |
| 561 | # Searching with complex parameters: |
| 562 | q = Query("search engine").verbatim().no_content().paging(0, 5) |
| 563 | |
| 564 | res = client.ft().search(q) |
| 565 | assert res is not None |
| 566 | |
| 567 | @pytest.mark.redismod |
| 568 | @skip_if_redis_enterprise() |
nothing calls this directly
no test coverage detected