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
By default, Scout will use the IDs of the results from Algolia and pull the data from the local database to create the collection.
46
42
47
-
Where clauses can also be added
43
+
Hence, `hydrate` will be much faster than `get`.
48
44
49
-
```php
50
-
Model::search('query')
51
-
->aroundLatLng(48.8588536, 2.3125377)
52
-
->where('something_id', 1)
53
-
->get();
54
-
```
55
45
46
+
**Note**: By using this method you must be sure that you are correctly keeping your algolia index in sync with your database
47
+
to avoid populating stale data.
48
+
49
+
#### Restrict attributes
56
50
57
-
## `with`
51
+
By default, this method will add all attributes from Algolia's record to your model.
52
+
53
+
If you want to remove sensitive or irrelevant data from your model, you can set a list of retrievable attributes in your Algolia dashboard. In this case, Algolia will only return these attributes while still searching every `searchableAttributes`.
54
+
55
+
### `with`
58
56
59
57
The `with` method gives you complete access to the Algolia options parameter. This allows you
60
58
to customise the search parameters exactly the same as you would using the algolia php library directly.
0 commit comments