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:
216
+
Each entry in an index has a unique identifier called `objectID`. There are two ways to add an entry to the index:
217
217
218
218
1. Using automatic `objectID` assignment. You will be able to access it in the answer.
219
219
2. Supplying your own `objectID`.
@@ -613,7 +613,65 @@ You can use the following optional arguments:
613
613
</div>
614
614
</td>
615
615
<td class='client-readme-param-content'>
616
-
<p>Remove the stop words from query before executing it. Defaults to false. Contains a list of stop words from 41 languages (Arabic, Armenian, Basque, Bengali, Brazilian, Bulgarian, Catalan, Chinese, Czech, Danish, Dutch, English, Finnish, French, Galician, German, Greek, Hindi, Hungarian, Indonesian, Irish, Italian, Japanese, Korean, Kurdish, Latvian, Lithuanian, Marathi, Norwegian, Persian, Polish, Portugese, Romanian, Russian, Slovak, Spanish, Swedish, Thai, Turkish, Ukranian, Urdu). In most use-cases, we don't recommend enabling this option.</p>
616
+
<p>Remove stop words from the query <strong>before</strong> executing it. Defaults to <code>false</code>. Use a boolean to enable/disable all 41 supported languages and a comma separated list of iso codes of the languages you want to use consider to enable the stopwords removal on a subset of them (select the one you have in your records). In most use-cases, you shouldn't need to enable this option.</p>
617
+
618
+
<p>List of 41 supported languages with their associated iso code: Arabic=ar, Armenian=hy, Basque=eu, Bengali=bn, Brazilian=pt-br, Bulgarian=bg, Catalan=ca, Chinese=zh, Czech=cs, Danish=da, Dutch=nl, English=en, Finnish=fi, French=fr, Galician=gl, German=de, Greek=el, Hindi=hi, Hungarian=hu, Indonesian=id, Irish=ga, Italian=it, Japanese=ja, Korean=ko, Kurdish=ku, Latvian=lv, Lithuanian=lt, Marathi=mr, Norwegian=no, Persian (Farsi)=fa, Polish=pl, Portugese=pt, Romanian=ro, Russian=ru, Slovak=sk, Spanish=es, Swedish=sv, Thai=th, Turkish=tr, Ukranian=uk, Urdu=ur</p>
619
+
620
+
<p>Stop words removal is applied on query words that are not interpreted as a prefix. The behavior depends of the queryType parameter:</p>
621
+
622
+
<ul>
623
+
<li><p><code>queryType=prefixLast</code> means the last query word is a prefix and it won’t be considered for stop words removal</p></li>
624
+
<li><p><code>queryType=prefixNone</code> means no query word are prefix, stop words removal will be applied on all query words</p></li>
625
+
<li><p><code>queryType=prefixAll</code> means all query terms are prefix, stop words won’t be removed</p></li>
626
+
</ul>
627
+
628
+
<p>This parameter is useful when you have a query in natural language like “what is a record?”. In this case, before executing the query, we will remove “what”, “is” and “a” in order to just search for “record”. This removal will remove false positive because of stop words, especially when combined with optional words. For most use cases, it is better to not use this feature as people search by keywords on search engines.</p>
<p>This parameter control how the <code>exact</code> ranking criterion is computed when the query contains one word. There is three different values:</p>
646
+
647
+
<ul>
648
+
<li><p><code>none</code>: no exact on single word query</p></li>
649
+
<li><p><code>word</code>: exact set to 1 if the query word is found in the record. The query word needs to have at least 3 chars and not be part of our stop words dictionary</p></li>
650
+
<li><p><code>attribute</code> (default): exact set to 1 if there is an attribute containing a string equals to the query</p></li>
<p>Specify the list of approximation that should be considered as an exact match in the ranking formula:</p>
669
+
670
+
<ul>
671
+
<li><p><code>ignorePlurals</code>: alternative words added by the ignorePlurals feature</p></li>
672
+
<li><p><code>singleWordSynonym</code>: single-word synonym (For example "NY" = "NYC")</p></li>
673
+
<li><p><code>multiWordsSynonym</code>: multiple-words synonym (For example "NY" = "New York")</p></li>
674
+
</ul>
617
675
618
676
</td>
619
677
</tr>
@@ -876,7 +934,7 @@ You can use the following optional arguments:
876
934
</div>
877
935
</td>
878
936
<td class='client-readme-param-content'>
879
-
<p>A string that contains the list of attributes you want to highlight according to the query. Attributes are separated by commas. You can also use a string array encoding (for example <code>["name","address"]</code>). If an attribute has no match for the query, the raw value is returned. By default, all indexed attributes are highlighted. You can use <code>*</code> if you want to highlight all attributes. A matchLevel is returned for each highlighted attribute and can contain:</p>
937
+
<p>A string that contains the list of attributes you want to highlight according to the query. Attributes are separated by commas. You can also use a string array encoding (for example <code>["name","address"]</code>). If an attribute has no match for the query, the raw value is returned. By default, all indexed attributes are highlighted (as long as they are strings). You can use <code>*</code> if you want to highlight all attributes. A matchLevel is returned for each highlighted attribute and can contain:</p>
880
938
881
939
<ul>
882
940
<li><strong>full</strong>: If all the query terms were found in the attribute.</li>
@@ -1023,7 +1081,7 @@ You can also use a string array encoding (for example `numericFilters: ["price>1
1023
1081
</div>
1024
1082
</td>
1025
1083
<td class='client-readme-param-content'>
1026
-
<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>
1084
+
<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>
1027
1085
1028
1086
<p>At indexing, tags should be added in the <strong>_tags</strong> attribute of objects. For example <code>{"_tags":["tag1","tag2"]}</code>.</p>
1029
1087
@@ -1252,12 +1310,12 @@ You can delete an object using its `objectID`:
1252
1310
index.deleteObject("myID")
1253
1311
```
1254
1312
1255
-
1256
1313
Delete by query
1257
1314
==================
1258
1315
1259
1316
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.
1260
1317
1318
+
1261
1319
```swift
1262
1320
let query: Query =/* [...] */
1263
1321
index.deleteByQuery(query)
@@ -1575,6 +1633,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 prefixmatching (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>
1663
+
1664
+
</td>
1665
+
</tr>
1666
+
1667
+
1578
1668
<tr>
1579
1669
<td valign='top'>
1580
1670
<div class='client-readme-param-container'>
@@ -1880,12 +1970,68 @@ To get a full description of how the Ranking works, you can have a look at our <
<div class="client-readme-param-meta"><div><em>Type:<strong>boolean or string array</strong></em></div><div><em>Default:<strong>false</strong></em></div></div>
1974
+
</div>
1975
+
</div>
1976
+
</td>
1977
+
<td class='client-readme-param-content'>
1978
+
<p>Remove stop words from the query <strong>before</strong> executing it. Defaults to <code>false</code>. Use a boolean to enable/disable all 41 supported languages and an array of string listing the iso codes of the languages you want to use consider to enable the stop words removal on a subset of them (select the one you have in your records).</p>
<p>Stop words removal is applied on query words that are not interpreted as a prefix. The behavior depends of the queryType setting:</p>
1983
+
1984
+
<ul>
1985
+
<li><p><code>queryType=prefixLast</code> means the last query word is a prefix and it won’t be considered for stop words removal</p></li>
1986
+
<li><p><code>queryType=prefixNone</code> means no query word are prefix, stop words removal will be applied on all query words</p></li>
1987
+
<li><p><code>queryType=prefixAll</code> means all query terms are prefix, stop words won’t be removed</p></li>
1988
+
</ul>
1989
+
1990
+
<p>This index setting is useful when you have queries in natural language like “what is a record?”. In this case, before executing the query, we will remove “what”, “is” and “a” in order to just search for “record”. This removal will remove false positive because of stop words. For most use cases, it is better to not use this feature as people search by keywords on search engines.</p>
<p>Remove stop words from query before executing it. Defaults to false. Contains stop words for41languages (Arabic, Armenian, Basque, Bengali, Brazilian, Bulgarian, Catalan, Chinese, Czech, Danish, Dutch, English, Finnish, French, Galician, German, Greek, Hindi, Hungarian, Indonesian, Irish, Italian, Japanese, Korean, Kurdish, Latvian, Lithuanian, Marathi, Norwegian, Persian, Polish, Portugese, Romanian, Russian, Slovak, Spanish, Swedish, Thai, Turkish, Ukranian, Urdu)</p>
2006
+
<p>This parameter controls how the <code>exact</code> ranking criterion is computed when the query contains one word. There is three different values:</p>
2007
+
2008
+
<ul>
2009
+
<li><p><code>none</code>: no <code>exact</code> on single word query</p></li>
2010
+
<li><p><code>word</code>:<code>exact</code>set to 1if the query word is found in the record. The query word needs to have at least 3 chars and not be part of our stop words dictionary</p></li>
2011
+
<li><p><code>attribute</code> (default): exact set to 1if there is an attribute containing a string equals to the query</p></li>
0 commit comments