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
Each entry in an index has a unique identifier called `objectID`. There are two ways to add en entry to the index:
195
+
Each entry in an index has a unique identifier called `objectID`. There are two ways to add an entry to the index:
196
196
197
197
1. Using automatic `objectID` assignment. You will be able to access it in the answer.
198
198
2. Supplying your own `objectID`.
@@ -302,7 +302,7 @@ Search
302
302
303
303
To perform a search, you only need to initialize the index and perform a call to the search function.
304
304
305
-
The search query allows only to retrieve 1000 hits, if you need to retrieve more than 1000 hits for seo, you can use [Backup / Retrieve all index content](#backup--retrieve-of-all-index-content)
305
+
The search query allows only to retrieve 1000 hits, if you need to retrieve more than 1000 hits for seo, you can use [Backup / Retrieve all index content](#backup--export-an-index)
306
306
307
307
```python
308
308
index = client.init_index("contacts")
@@ -961,7 +961,7 @@ You can also use a string array encoding (for example `numericFilters: ["price>1
961
961
</div>
962
962
</td>
963
963
<td class='client-readme-param-content'>
964
-
<p>Filter the query by a set of tags. You can AND tags by separating them with commas. To OR tags, you must add parentheses. For example, <code>tags=tag1,(tag2,tag3)</code> means <em>tag1 AND (tag2 OR tag3)</em>. You can also use a string array encoding. For example, <code>tagFilters: ["tag1",["tag2","tag3"]]</code> means <em>tag1 AND (tag2 OR tag3)</em>.</p>
964
+
<p>Filter the query by a set of tags. You can AND tags by separating them with commas. To OR tags, you must add parentheses. For example, <code>tagFilters=tag1,(tag2,tag3)</code> means <em>tag1 AND (tag2 OR tag3)</em>. You can also use a string array encoding. For example, <code>tagFilters: ["tag1",["tag2","tag3"]]</code> means <em>tag1 AND (tag2 OR tag3)</em>. Negations are supported via the <code>-</code> operator, prefixing the value. For example: <code>tagFilters=tag1,-tag2</code>.</p>
965
965
966
966
<p>At indexing, tags should be added in the <strong>_tags</strong> attribute of objects. For example <code>{"_tags":["tag1","tag2"]}</code>.</p>
967
967
@@ -1045,9 +1045,11 @@ You can also use a string array encoding (for example `numericFilters: ["price>1
1045
1045
</td>
1046
1046
<td class='client-readme-param-content'>
1047
1047
<p>Filter the query with numeric, facet or/and tag filters. The syntax is a SQL like syntax, you can use the OR and AND keywords. The syntax for the underlying numeric, facet and tag filters is the same than in the other filters:
1048
-
<code>available=1 AND (category:Book OR NOT category:Ebook) AND public</code>
1048
+
<code>available=1 AND (category:Book OR NOT category:Ebook) AND _tags:public</code>
1049
1049
<code>date: 1441745506 TO 1441755506 AND inStock > 0 AND author:"John Doe"</code></p>
1050
1050
1051
+
<p>If no attribute name is specified, the filter applies to <code>_tags</code>. For example: <code>public OR user_42</code> will translate to <code>_tags:public OR _tags:user_42</code>.</p>
1052
+
1051
1053
<p>The list of keywords is:</p>
1052
1054
1053
1055
<ul>
@@ -1109,7 +1111,7 @@ You can send multiple queries with a single API call using a batch of queries:
@@ -1152,12 +1154,12 @@ You can delete an object using its `objectID`:
1152
1154
index.delete_object("myID")
1153
1155
```
1154
1156
1155
-
1156
1157
Delete by query
1157
1158
==================
1158
1159
1159
1160
You can delete all objects matching a single query with the following code. Internally, the API client performs the query, deletes all matching hits, and waits until the deletions have been applied.
1160
1161
1162
+
1161
1163
```python
1162
1164
params = {}
1163
1165
index.delete_by_query("John", params)
@@ -1470,6 +1472,38 @@ To get a full description of how the Ranking works, you can have a look at our <
<p>List of attributes on which you want to disable prefix matching (must be a subset of the <code>attributesToIndex</code> index setting). This setting is useful on attributes that contain string that should not be matched as a prefix (for example a product SKU). By default the list is empty.</p>
<p>List of attributes on which you want to disable the computation of <code>exact</code> criteria (must be a subset of the <code>attributesToIndex</code> index setting). By default the list is empty.</p>
1502
+
1503
+
</td>
1504
+
</tr>
1505
+
1506
+
1473
1507
<tr>
1474
1508
<td valign='top'>
1475
1509
<div class='client-readme-param-container'>
@@ -2180,7 +2214,7 @@ You may have a single index containing **per user** data. In that case, all reco
2180
2214
```python
2181
2215
# generate a public API key for user 42. Here, records are tagged with:
0 commit comments