Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit 9b24f35

Browse files
algoliareadmebotPLNech
authored andcommitted
docs(README): automatic update (#166)
Update README Android [This list might not be relevant] refactor: Renaming attributes (#132) * refactor: Renaming attributes Specifically, this commit replaces: - attributesToIndex with searchableAttributes - numericAttributesToIndex with numericAttributesForFiltering * refactor: Renaming `forwardToSlaves` into `forwardToReplicas` * Display legacy names in parameter descriptions [ci skip]
1 parent 24f41fd commit 9b24f35

File tree

1 file changed

+22
-18
lines changed

1 file changed

+22
-18
lines changed

README.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ You can also configure the list of attributes you want to index by order of impo
188188

189189
```java
190190
JSONObject settings = new JSONObject()
191-
.append("attributesToIndex", "lastname")
192-
.append("attributesToIndex", "firstname")
193-
.append("attributesToIndex", "company");
191+
.append("searchableAttributes", "lastname")
192+
.append("searchableAttributes", "firstname")
193+
.append("searchableAttributes", "company");
194194
index.setSettingsAsync(settings, null);
195195
```
196196

@@ -391,7 +391,7 @@ When [`facets`](#facets) is non-empty, the following additional fields are retur
391391

392392
<!--PARAMETERS_LINK-->
393393
Here is the list of parameters you can use with the search method (`search` [scope](#scope)):
394-
Parameters that can also be used in a setSettings also have the `indexing` [scope](#scope).
394+
Parameters that can also be used in a setSettings also have the `indexing` [scope](#scope)
395395

396396
**Search**
397397

@@ -822,7 +822,7 @@ Parameters that can be overridden at search time also have the `search` [scope](
822822

823823
**Attributes**
824824

825-
- [attributesToIndex](#attributestoindex) `settings`
825+
- [searchableAttributes](#searchableattributes) `settings`
826826
- [attributesForFaceting](#attributesforfaceting) `settings`
827827
- [attributesToRetrieve](#attributestoretrieve) `settings`, `search`
828828
- [unretrievableAttributes](#unretrievableattributes) `settings`
@@ -875,7 +875,7 @@ Parameters that can be overridden at search time also have the `search` [scope](
875875

876876
- [attributeForDistinct](#attributefordistinct) `settings`
877877
- [distinct](#distinct) `settings`, `search`
878-
- [numericAttributesToIndex](#numericattributestoindex) `settings`
878+
- [numericAttributesForFiltering](#numericattributesforfiltering) `settings`
879879
- [allowCompressionOfIntegerArray](#allowcompressionofintegerarray) `settings`
880880
- [altCorrections](#altcorrections) `settings`
881881
- [placeholders](#placeholders) `settings`
@@ -907,7 +907,7 @@ They are three scopes:
907907

908908
**Attributes**
909909

910-
- [attributesToIndex](#attributestoindex) `settings`
910+
- [searchableAttributes](#searchableattributes) `settings`
911911
- [attributesForFaceting](#attributesforfaceting) `settings`
912912
- [unretrievableAttributes](#unretrievableattributes) `settings`
913913
- [attributesToRetrieve](#attributestoretrieve) `settings`, `search`
@@ -978,7 +978,7 @@ They are three scopes:
978978
- [attributeForDistinct](#attributefordistinct) `settings`
979979
- [distinct](#distinct) `settings`, `search`
980980
- [getRankingInfo](#getrankinginfo) `search`
981-
- [numericAttributesToIndex](#numericattributestoindex) `settings`
981+
- [numericAttributesForFiltering](#numericattributesforfiltering) `settings`
982982
- [allowCompressionOfIntegerArray](#allowcompressionofintegerarray) `settings`
983983
- [numericFilters (deprecated)](#numericfilters-deprecated) `search`
984984
- [tagFilters (deprecated)](#tagfilters-deprecated) `search`
@@ -1004,11 +1004,12 @@ The instant search query string, used to set the string you want to search in yo
10041004

10051005
### Attributes
10061006

1007-
#### attributesToIndex
1007+
#### searchableAttributes
10081008

10091009
- scope: `settings`
10101010
- type: `array of strings`
10111011
- default: `*`
1012+
- formerly known as: `attributesToIndex`
10121013

10131014

10141015
The list of attributes you want index (i.e. to make searchable).
@@ -1020,7 +1021,7 @@ This parameter has two important uses:
10201021

10211022
1. **Limit the attributes to index.** For example, if you store the URL of a picture, you want to store it and be able to retrieve it, but you probably don't want to search in the URL.
10221023
1023-
2. **Control part of the ranking.** The contents of the `attributesToIndex` parameter impacts ranking in two complementary ways:
1024+
2. **Control part of the ranking.** The contents of the `searchableAttributes` parameter impacts ranking in two complementary ways:
10241025
10251026
First, the order in which attributes are listed defines their ranking priority: matches in attributes at the beginning of the list will be considered more important than matches in attributes further down the list. To assign the same priority to several attributes, pass them within the same string, separated by commas. For example, by specifying `["title,"alternative_title", "text"]`, `title` and `alternative_title` will have the same priority, but a higher priority than `text`.
10261027
@@ -1075,13 +1076,13 @@ You can also use `*` to retrieve all values when an **attributesToRetrieve** set
10751076

10761077
- scope: `search`
10771078
- type: `array of strings`
1078-
- default: `attributesToIndex`
1079+
- default: `searchableAttributes`
10791080

10801081

1081-
List of attributes you want to use for textual search (must be a subset of the `attributesToIndex` index setting).
1082+
List of attributes you want to use for textual search (must be a subset of the `searchableAttributes` index setting).
10821083
Attributes are separated with a comma such as `"name,address"`.
10831084
You can also use JSON string array encoding such as `encodeURIComponent("[\"name\",\"address\"]")`.
1084-
By default, all attributes specified in the `attributesToIndex` settings are used to search.
1085+
By default, all attributes specified in the `searchableAttributes` settings are used to search.
10851086

10861087

10871088
### Ranking
@@ -1101,7 +1102,7 @@ We have nine available criterion:
11011102
* `geo`: Sort according to decreasing distance when performing a geo location based search.
11021103
* `words`: Sort according to the number of query words matched by decreasing order. This parameter is useful when you use the `optionalWords` query parameter to have results with the most matched words first.
11031104
* `proximity`: Sort according to the proximity of the query words in hits.
1104-
* `attribute`: Sort according to the order of attributes defined by attributesToIndex.
1105+
* `attribute`: Sort according to the order of attributes defined by searchableAttributes.
11051106
* `exact`:
11061107
* If the user query contains one word: sort objects having an attribute that is exactly the query word before others. For example, if you search for the TV show "V", you want to find it with the "V" query and avoid getting all popular TV shows starting by the letter V before it.
11071108
* If the user query contains multiple words: sort according to the number of words that matched exactly (not as a prefix).
@@ -1134,6 +1135,7 @@ you can have a look at our [Ranking guide](https://www.algolia.com/doc/guides/re
11341135
- scope: `settings`
11351136
- type: `array of strings`
11361137
- default: `[]`
1138+
- formerly known as: `slaves`
11371139

11381140

11391141
The list of indices on which you want to replicate all write operations.
@@ -1416,7 +1418,7 @@ If set to true, plural won't be considered as a typo. For example, car and cars,
14161418

14171419

14181420
List of attributes on which you want to disable typo tolerance
1419-
(must be a subset of the `attributesToIndex` index setting).
1421+
(must be a subset of the `searchableAttributes` index setting).
14201422

14211423
Attributes are separated with a comma such as `"name,address"`.
14221424
You can also use JSON string array encoding such as `encodeURIComponent("[\"name\",\"address\"]")`.
@@ -1674,7 +1676,7 @@ For most use cases, it is better to not use this feature as people search by key
16741676
16751677
16761678
List of attributes on which you want to disable prefix matching
1677-
(must be a subset of the `attributesToIndex` index setting).
1679+
(must be a subset of the `searchableAttributes` index setting).
16781680
16791681
This setting is useful on attributes that contain string that should not be matched as a prefix
16801682
(for example a product SKU).
@@ -1688,7 +1690,7 @@ This setting is useful on attributes that contain string that should not be matc
16881690
16891691
16901692
List of attributes on which you want to disable the computation of `exact` criteria
1691-
(must be a subset of the `attributesToIndex` index setting).
1693+
(must be a subset of the `searchableAttributes` index setting).
16921694
16931695
#### exactOnSingleWordQuery
16941696
@@ -1768,11 +1770,12 @@ you can have a look at our [guide on distinct](https://www.algolia.com/doc/searc
17681770
If set to true,
17691771
the result hits will contain ranking information in the **_rankingInfo** attribute.
17701772
1771-
#### numericAttributesToIndex
1773+
#### numericAttributesForFiltering
17721774
17731775
- scope: `settings`
17741776
- type: `array of strings`
17751777
- default: ``
1778+
- formerly known as: `numericAttributesToIndex`
17761779
17771780
17781781
All numerical attributes are automatically indexed as numerical filters
@@ -2152,3 +2155,4 @@ The REST API lets your interact directly with Algolia platforms from anything th
21522155
21532156
21542157
2158+

0 commit comments

Comments
 (0)