Skip to content

Commit 1437f5c

Browse files
authored
Merge pull request #201 from algoliareadmebot/master
Update README
2 parents 1ebf2ce + 84be410 commit 1437f5c

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

README.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ ALGOLIA = {
7979
}
8080
```
8181

82-
There are two optional settings:
82+
There are three optional settings:
8383

8484
* `INDEX_PREFIX`: prefix all indexes. Use it to separate different applications, like `site1_Products` and `site2_Products`.
8585
* `INDEX_SUFFIX`: suffix all indexes. Use it to differenciate development and production environment, like `Location_dev` and `Location_prod`.
8686
* `AUTO_INDEXING`: automatically synchronize the models with Algolia (default to **True**).
8787

8888
## Quick Start
8989

90-
Simply call `AlgoliaSearch.register()` for each of the models you want to index. A good place to do this is in your application's AppConfig (generally named `apps.py`). More info in the [documentation](https://docs.djangoproject.com/en/1.8/ref/applications/)
90+
Simply call `algoliasearch.register()` for each of the models you want to index. A good place to do this is in your application's AppConfig (generally named `apps.py`). More info in the [documentation](https://docs.djangoproject.com/en/1.8/ref/applications/)
9191

9292
```python
9393
from django.apps import AppConfig
@@ -162,7 +162,7 @@ Use the `geo_field` attribute to localize your record. `geo_field` should be a c
162162

163163
```python
164164
class Contact(models.model):
165-
name = models.CharField(max_length=20)
165+
name = models.CharField(max_lenght=20)
166166
lat = models.FloatField()
167167
lng = models.FloatField()
168168

@@ -230,18 +230,9 @@ class ArticleIndex(AlgoliaIndex):
230230

231231
## Restrict indexing to a subset of your data
232232

233-
You can add constraints controlling if a record must be indexed or not. `should_index` should be a boolean or a callable that returns a boolean.
233+
You can add constraints controlling if a record must be indexed or not. `should_index` should be a callable that returns a boolean.
234234

235235
```python
236-
# with a boolean attribute
237-
class Article(models.model):
238-
name = models.CharField(max_length=64)
239-
is_indexable = True
240-
241-
class ArticleIndex(AlgoliaIndex):
242-
should_index = "is_indexable"
243-
244-
# with a callable returning a boolean
245236
class Contact(models.model):
246237
name = models.CharField(max_lenght=20)
247238
age = models.IntegerField()

0 commit comments

Comments
 (0)