Skip to content

Commit 46c20d2

Browse files
author
maxiloc
authored
Merge pull request #101 from algoliareadmebot/master
Update README
2 parents eaa64f6 + 0ae03e5 commit 46c20d2

File tree

1 file changed

+41
-13
lines changed

1 file changed

+41
-13
lines changed

README.md

Lines changed: 41 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ Parameters that can also be used in a setSettings also have the `indexing` [scop
357357
- [numericFilters (deprecated)](#numericfilters-deprecated) `search`
358358
- [tagFilters (deprecated)](#tagfilters-deprecated) `search`
359359
- [facetFilters (deprecated)](#facetfilters-deprecated) `search`
360-
- [analytics](#analytics) `settings`, `search`
360+
- [analytics](#analytics) `search`
361361

362362
<!--/PARAMETERS_LINK-->
363363

@@ -694,7 +694,7 @@ Parameters that can be override at search time also have the `indexing` [scope](
694694
- [optionalWords](#optionalwords) `settings`, `search`
695695
- [removeStopWords](#removestopwords) `settings`, `search`
696696
- [disablePrefixOnAttributes](#disableprefixonattributes) `settings`
697-
- [disableExactOnAttributes](#disableexactonattributes) `settings`
697+
- [disableExactOnAttributes](#disableexactonattributes) `settings`, `search`
698698
- [exactOnSingleWordQuery](#exactonsinglewordquery) `settings`, `search`
699699
- [alternativesAsExact](#alternativesasexact) `settings`, `search`
700700

@@ -752,6 +752,7 @@ They are three scopes:
752752
- [highlightPreTag](#highlightpretag) `settings`, `search`
753753
- [highlightPostTag](#highlightposttag) `settings`, `search`
754754
- [snippetEllipsisText](#snippetellipsistext) `settings`, `search`
755+
- [restrictHighlightAndSnippetArrays](#restricthighlightandsnippetarrays) `settings`, `search`
755756

756757
**Pagination**
757758
- [page](#page) `search`
@@ -781,7 +782,7 @@ They are three scopes:
781782
- [optionalWords](#optionalwords) `settings`, `search`
782783
- [removeStopWords](#removestopwords) `settings`, `search`
783784
- [disablePrefixOnAttributes](#disableprefixonattributes) `settings`
784-
- [disableExactOnAttributes](#disableexactonattributes) `settings`
785+
- [disableExactOnAttributes](#disableexactonattributes) `settings`, `search`
785786
- [exactOnSingleWordQuery](#exactonsinglewordquery) `settings`, `search`
786787
- [alternativesAsExact](#alternativesasexact) `settings`, `search`
787788

@@ -794,7 +795,7 @@ They are three scopes:
794795
- [numericFilters (deprecated)](#numericfilters-deprecated) `search`
795796
- [tagFilters (deprecated)](#tagfilters-deprecated) `search`
796797
- [facetFilters (deprecated)](#facetfilters-deprecated) `search`
797-
- [analytics](#analytics) `settings`, `search`
798+
- [analytics](#analytics) `search`
798799
- [altCorrections](#altcorrections) `settings`
799800
- [placeholders](#placeholders) `settings`
800801

@@ -1002,20 +1003,32 @@ The list of keywords is:
10021003
- default: `""`
10031004

10041005

1005-
List of object attributes that you want to use for faceting.
1006+
You can use [facets](#facets) to retrieve only a part of your attributes declared in
1007+
**[attributesForFaceting](#attributesforfaceting)** attributes.
1008+
It will not filter your results, if you want to filter results you should use [filters](#filters).
10061009

10071010
For each of the declared attributes, you'll be able to retrieve a list of the most relevant facet values,
10081011
and their associated count for the current query.
10091012

1010-
Attributes are separated by a comma.
1013+
** Example **
10111014

1012-
For example, `"category,author"`.
1015+
If you have defined in your **[attributesForFaceting](#attributesforfaceting)**:
1016+
1017+
['category', 'author', 'nb_views', 'nb_downloads']
1018+
1019+
But for the current search want to retrieve only facet values for `category` and `author`.
1020+
1021+
You can specify your attributes coma separated.
1022+
1023+
For this example: `"category,author"`.
10131024

10141025
You can also use JSON string array encoding.
10151026

1016-
For example, `["category","author"]`.
1027+
For this example: `["category","author"]`.
1028+
1029+
**Warnings**
10171030

1018-
Only the attributes that have been added in **attributesForFaceting** index setting can be used in this parameter.
1031+
- When using [facets](#facets) in a search query, only attributes that have been added in **attributesForFaceting** index setting can be used in this parameter.
10191032
You can also use `*` to perform faceting on all attributes specified in `attributesForFaceting`.
10201033
If the number of results is important, the count can be approximate,
10211034
the attribute `exhaustiveFacetsCount` in the response is true when the count is exact.
@@ -1097,6 +1110,15 @@ Specify the string that is inserted after the highlighted parts in the query res
10971110
String used as an ellipsis indicator when a snippet is truncated.
10981111
Defaults to an empty string for all accounts created before 10/2/2016, and to (UTF-8 U+2026) for accounts created after that date.
10991112

1113+
#### restrictHighlightAndSnippetArrays
1114+
1115+
- scope: `settings`, `search`
1116+
- type: `boolean`
1117+
- default: `false`
1118+
1119+
1120+
If set to true, restrict arrays in highlights and snippets to items that matched the query at least partially else return all array items in highlights and snippets.
1121+
11001122
### Pagination
11011123

11021124
#### page
@@ -1408,7 +1430,7 @@ This setting is useful on attributes that contain string that should not be matc
14081430
14091431
#### disableExactOnAttributes
14101432
1411-
- scope: `settings`
1433+
- scope: `settings`, `search`
14121434
- type: `array of strings`
14131435
- default: `[]`
14141436
@@ -1528,6 +1550,8 @@ When enabled, the integer array is reordered to reach a better compression ratio
15281550
- default: `[]`
15291551
15301552
1553+
*This parameter is deprecated. Please use [filters](#filters) instead.*
1554+
15311555
A string that contains the comma separated list of numeric filters you want to apply.
15321556
The filter syntax is `attributeName` followed by `operand` followed by `value`.
15331557
Supported operands are `<`, `<=`, `=`, `>` and `>=`.
@@ -1552,6 +1576,8 @@ You can also use a string array encoding (for example `numericFilters: ["price>1
15521576
- default: `""`
15531577
15541578
1579+
*This parameter is deprecated. Please use [filters](#filters) instead.*
1580+
15551581
Filter the query by a set of tags.
15561582
15571583
You can AND tags by separating them with commas.
@@ -1578,6 +1604,8 @@ For example `{"_tags":["tag1","tag2"]}`.
15781604
- default: `""`
15791605
15801606
1607+
*This parameter is deprecated. Please use [filters](#filters) instead.*
1608+
15811609
Filter the query with a list of facets. Facets are separated by commas and is encoded as `attributeName:value`.
15821610
To OR facets, you must add parentheses.
15831611
@@ -1589,9 +1617,9 @@ For example, `[["category:Book","category:Movie"],"author:John%20Doe"]`.
15891617
15901618
#### analytics
15911619
1592-
- scope: `settings`, `search`
1593-
- type: `string`
1594-
- default: `['ignorePlurals', 'singleWordSynonym']`
1620+
- scope: `search`
1621+
- type: `boolean`
1622+
- default: `true`
15951623
15961624
15971625
If set to false, this query will not be taken into account in the analytics feature.

0 commit comments

Comments
 (0)