Skip to content

Commit 0675d69

Browse files
Merge pull request #61 from algoliareadmebot/master
Update README
2 parents d1cca90 + 4eaf443 commit 0675d69

File tree

1 file changed

+130
-4
lines changed

1 file changed

+130
-4
lines changed

README.md

Lines changed: 130 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77

88

99

10+
We implemented an asynchronous version of the client that may suit your need if
11+
you are using a framework such as `aiohttp` in your backend. This version can
12+
be found [here](https://github.com/algolia/algoliasearch-client-python-async).
13+
14+
1015

1116
<!--NO_HTML-->
1217

@@ -551,7 +556,65 @@ You can use the following optional arguments:
551556
</div>
552557
</td>
553558
<td class='client-readme-param-content'>
554-
<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&#39;t recommend enabling this option.</p>
559+
<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&#39;t need to enable this option.</p>
560+
561+
<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>
562+
563+
<p>Stop words removal is applied on query words that are not interpreted as a prefix. The behavior depends of the queryType parameter:</p>
564+
565+
<ul>
566+
<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>
567+
<li><p><code>queryType=prefixNone</code> means no query word are prefix, stop words removal will be applied on all query words</p></li>
568+
<li><p><code>queryType=prefixAll</code> means all query terms are prefix, stop words won’t be removed</p></li>
569+
</ul>
570+
571+
<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>
572+
573+
</td>
574+
</tr>
575+
576+
577+
578+
<tr>
579+
<td valign='top'>
580+
<div class='client-readme-param-container'>
581+
<div class='client-readme-param-container-inner'>
582+
<div class='client-readme-param-name'><code>exactOnSingleWordQuery</code></div>
583+
<div class="client-readme-param-meta"><div><em>Default: <strong>attribute</strong></em></div></div>
584+
</div>
585+
</div>
586+
</td>
587+
<td class='client-readme-param-content'>
588+
<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>
589+
590+
<ul>
591+
<li><p><code>none</code>: no exact on single word query</p></li>
592+
<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>
593+
<li><p><code>attribute</code> (default): exact set to 1 if there is an attribute containing a string equals to the query</p></li>
594+
</ul>
595+
596+
</td>
597+
</tr>
598+
599+
600+
601+
<tr>
602+
<td valign='top'>
603+
<div class='client-readme-param-container'>
604+
<div class='client-readme-param-container-inner'>
605+
<div class='client-readme-param-name'><code>alternativesAsExact</code></div>
606+
<div class="client-readme-param-meta"><div><em>Default: <strong>["ignorePlurals", "singleWordSynonym"]</strong></em></div></div>
607+
</div>
608+
</div>
609+
</td>
610+
<td class='client-readme-param-content'>
611+
<p>Specify the list of approximation that should be considered as an exact match in the ranking formula:</p>
612+
613+
<ul>
614+
<li><p><code>ignorePlurals</code>: alternative words added by the ignorePlurals feature</p></li>
615+
<li><p><code>singleWordSynonym</code>: single-word synonym (For example &quot;NY&quot; = &quot;NYC&quot;)</p></li>
616+
<li><p><code>multiWordsSynonym</code>: multiple-words synonym (For example &quot;NY&quot; = &quot;New York&quot;)</p></li>
617+
</ul>
555618

556619
</td>
557620
</tr>
@@ -814,7 +877,7 @@ You can use the following optional arguments:
814877
</div>
815878
</td>
816879
<td class='client-readme-param-content'>
817-
<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>[&quot;name&quot;,&quot;address&quot;]</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>
880+
<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>[&quot;name&quot;,&quot;address&quot;]</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>
818881

819882
<ul>
820883
<li><strong>full</strong>: If all the query terms were found in the attribute.</li>
@@ -1180,6 +1243,13 @@ print settings
11801243
index.set_settings({"customRanking": ["desc(followers)"]})
11811244
```
11821245

1246+
## Slave settings
1247+
1248+
You can forward all settings updates to the slaves of an index by using the `forwardToSlaves` option:
1249+
1250+
```python
1251+
index.set_settings({"customRanking": ["desc(followers)"]}, True)
1252+
```
11831253

11841254
## Indexing parameters
11851255

@@ -1809,12 +1879,68 @@ To get a full description of how the Ranking works, you can have a look at our <
18091879
<div class='client-readme-param-container'>
18101880
<div class='client-readme-param-container-inner'>
18111881
<div class='client-readme-param-name'><code>removeStopWords</code></div>
1812-
<div class="client-readme-param-meta"><div><em>Type: <strong>boolean</strong></em></div><div><em>Default: <strong>false</strong></em></div></div>
1882+
<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>
1883+
</div>
1884+
</div>
1885+
</td>
1886+
<td class='client-readme-param-content'>
1887+
<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>
1888+
1889+
<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>
1890+
1891+
<p>Stop words removal is applied on query words that are not interpreted as a prefix. The behavior depends of the queryType setting:</p>
1892+
1893+
<ul>
1894+
<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>
1895+
<li><p><code>queryType=prefixNone</code> means no query word are prefix, stop words removal will be applied on all query words</p></li>
1896+
<li><p><code>queryType=prefixAll</code> means all query terms are prefix, stop words won’t be removed</p></li>
1897+
</ul>
1898+
1899+
<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>
1900+
1901+
</td>
1902+
</tr>
1903+
1904+
1905+
<tr>
1906+
<td valign='top'>
1907+
<div class='client-readme-param-container'>
1908+
<div class='client-readme-param-container-inner'>
1909+
<div class='client-readme-param-name'><code>exactOnSingleWordQuery</code></div>
1910+
<div class="client-readme-param-meta"><div><em>Type: <strong>string</strong></em></div><div><em>Default: <strong>attribute</strong></em></div></div>
18131911
</div>
18141912
</div>
18151913
</td>
18161914
<td class='client-readme-param-content'>
1817-
<p>Remove stop words from query before executing it. Defaults to false. Contains stop words for 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)</p>
1915+
<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>
1916+
1917+
<ul>
1918+
<li><p><code>none</code>: no <code>exact</code> on single word query</p></li>
1919+
<li><p><code>word</code>: <code>exact</code> 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>
1920+
<li><p><code>attribute</code> (default): exact set to 1 if there is an attribute containing a string equals to the query</p></li>
1921+
</ul>
1922+
1923+
</td>
1924+
</tr>
1925+
1926+
1927+
<tr>
1928+
<td valign='top'>
1929+
<div class='client-readme-param-container'>
1930+
<div class='client-readme-param-container-inner'>
1931+
<div class='client-readme-param-name'><code>alternativesAsExact</code></div>
1932+
<div class="client-readme-param-meta"><div><em>Type: <strong>string array</strong></em></div><div><em>Default: <strong>["ignorePlurals", "singleWordSynonym"]</strong></em></div></div>
1933+
</div>
1934+
</div>
1935+
</td>
1936+
<td class='client-readme-param-content'>
1937+
<p>Specify the list of approximation that should be considered as an exact match in the ranking formula:</p>
1938+
1939+
<ul>
1940+
<li><p><code>ignorePlurals</code>: alternative words added by the ignorePlurals feature</p></li>
1941+
<li><p><code>singleWordSynonym</code>: single-word synonym (For example &quot;NY&quot; = &quot;NYC&quot;)</p></li>
1942+
<li><p><code>multiWordsSynonym</code>: multiple-words synonym (For example &quot;NY&quot; = &quot;New York&quot;)</p></li>
1943+
</ul>
18181944

18191945
</td>
18201946
</tr>

0 commit comments

Comments
 (0)