Skip to content

Commit 42e81fa

Browse files
committed
Merge branch 'rafi-async1' of ssh://github.com/RediSearch/redisearch-py into rafi-async1
2 parents ec69a24 + a6264b9 commit 42e81fa

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

API.md

-5
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ res = client.search("search engine")
3232
print res.total # "1"
3333
print res.docs[0].title
3434

35-
# Searching with snippets
36-
res = client.search("search engine", snippet_sizes = {'body': 50})
37-
3835
# Searching with complext parameters:
3936
q = Query("search engine").verbatim().no_content().paging(0,5)
4037
res = client.search(q)
@@ -356,8 +353,6 @@ Search the index for a given query, and return a result of documents
356353

357354
- **query**: the search query. Either a text for simple queries with default parameters, or a Query object for complex queries.
358355
See RediSearch's documentation on query format
359-
- **snippet_sizes**: A dictionary of {field: snippet_size} used to trim and format the result. e.g.e {'body': 500}
360-
361356

362357
## Class BatchIndexer
363358
A batch indexer allows you to automatically batch

README.md

+4-7
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ For more details, visit [http://redisearch.io](http://redisearch.io)
3737
## Example: Using the Python Client
3838

3939
```py
40-
from redisearch import Client, TextField
40+
from redisearch import Client, TextField, IndexDefinition, Query
4141

4242
# Creating a client with a given index name
4343
client = Client("myIndex")
@@ -65,16 +65,13 @@ client.add_document(
6565
# Simple search
6666
res = client.search("search engine")
6767

68-
# Searching with snippets
69-
res = client.search("search engine", snippet_sizes={"body": 50})
68+
# the result has the total number of results, and a list of documents
69+
print res.total # "1"
70+
print res.docs[0].title
7071

7172
# Searching with complex parameters:
7273
q = Query("search engine").verbatim().no_content().with_scores().paging(0, 5)
7374
res = client.search(q)
74-
75-
# The result has the total number of results, and a list of documents
76-
print(res.total) # "1"
77-
print(res.docs[0].title)
7875
```
7976

8077
## Installing

redisearch/__init__.py

-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030
print res.total # "1"
3131
print res.docs[0].title
3232
33-
# Searching with snippets
34-
res = client.search("search engine", snippet_sizes = {'body': 50})
35-
3633
# Searching with complext parameters:
3734
q = Query("search engine").verbatim().no_content().paging(0,5)
3835
res = client.search(q)

redisearch/client.py

-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,6 @@ def search(self, query):
465465
466466
- **query**: the search query. Either a text for simple queries with default parameters, or a Query object for complex queries.
467467
See RediSearch's documentation on query format
468-
- **snippet_sizes**: A dictionary of {field: snippet_size} used to trim and format the result. e.g.e {'body': 500}
469468
"""
470469
args, query = self._mk_query_args(query)
471470
st = time.time()

0 commit comments

Comments
 (0)