You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-1Lines changed: 27 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ Table of Content
21
21
1.[Commands](#commands)
22
22
1.[Search](#search)
23
23
1.[Geo-search](#geo-search)
24
+
1.[Tags](#tags)
24
25
1.[Options](#options)
25
26
26
27
@@ -96,13 +97,22 @@ And then replace `algoliasearch.register(YourModel)` with `algoliasearch.registe
96
97
97
98
We recommend the usage of our [JavaScript API Client](https://github.com/algolia/algoliasearch-client-js) to perform queries directly from the end-user browser without going through your server.
98
99
100
+
However, if you want to search from your backend you can use the `raw_search(YourModel, 'yourQuery', params)` method. It retrieves the raw JSON answer from the API.
101
+
102
+
```python
103
+
from django.contrib.algoliasearch import raw_search
104
+
105
+
params = { "hitsPerPage": 5 }
106
+
raw_search(Contact, "jim", params)
107
+
```
108
+
99
109
## Geo-Search
100
110
101
111
Use the `geo_field` attribute to localize your record. `geo_field` should be a callable that returns a tuple (latitude, longitude).
102
112
103
113
```python
104
114
classContact(models.model):
105
-
name = models.CharField()
115
+
name = models.CharField(max_lenght=20)
106
116
lat = models.FloatField()
107
117
lng = models.FloatField()
108
118
@@ -160,3 +170,19 @@ class ArticleIndex(AlgoliaIndex):
0 commit comments