(self, client)
| 546 | |
| 547 | @pytest.mark.redismod |
| 548 | def test_example(self, client): |
| 549 | class="cm"># Creating the index definition and schema |
| 550 | client.ft().create_index((TextField(class="st">"title", weight=5.0), TextField(class="st">"body"))) |
| 551 | |
| 552 | class="cm"># Indexing a document |
| 553 | client.hset( |
| 554 | class="st">"doc1", |
| 555 | mapping={ |
| 556 | class="st">"title": class="st">"RediSearch", |
| 557 | class="st">"body": class="st">"Redisearch impements a search engine on top of redis", |
| 558 | }, |
| 559 | ) |
| 560 | |
| 561 | class="cm"># Searching with complex parameters: |
| 562 | q = Query(class="st">"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