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
Copy file name to clipboardExpand all lines: content/docs/reactivesearch/react/result/reactivelist.md
+57-44Lines changed: 57 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ Example uses:
39
39
componentId="SearchResult"
40
40
compoundClause="filter"
41
41
dataField="ratings"
42
+
vectorDataField="vector_data" # Only one of dataField or vectorDataField is needed
42
43
pagination={false}
43
44
paginationAt="bottom"
44
45
pages={5}
@@ -47,11 +48,9 @@ Example uses:
47
48
loader="Loading Results.."
48
49
showResultStats={true}
49
50
renderItem={res=><div>{res.title}</div>}
50
-
renderResultStats={function(stats) {
51
-
return`Showing ${stats.displayedResults} of total ${stats.numberOfResults} in ${
52
-
stats.time
53
-
} ms`;
54
-
}}
51
+
renderResultStats={stats=>`Showing ${stats.displayedResults} of total ${stats.numberOfResults} in ${
52
+
stats.time
53
+
} ms`}
55
54
highlight={true}
56
55
highlightConfig={{
57
56
'pre_tags': ['<mark>'],
@@ -124,9 +123,18 @@ Accepts the following properties:
124
123
125
124
| Type | Optional |
126
125
|------|----------|
127
-
|`String`|No|
126
+
|`String`|Yes|
128
127
129
128
data field to be connected to the component's UI view. It is useful for providing a sorting context.
129
+
130
+
### vectorDataField
131
+
132
+
| Type | Optional |
133
+
|------|----------|
134
+
|`String`| Yes |
135
+
136
+
vector data field to query for retrieving hits for the component's UI view. This is used when applying kNN search. Introduced in v4.3.0.
137
+
130
138
### distinctField
131
139
132
140
| Type | Optional |
@@ -147,7 +155,7 @@ You can read more about it over [here](https://www.elastic.co/guide/en/elasticse
147
155
148
156
> It is possible to override this query by providing `defaultQuery`.
149
157
150
-
> Note: This prop has been marked as deprecated startingv3.18.0. Please use the`distinctField` prop instead.
158
+
> Note: This prop has been marked as deprecated startingv3.18.0. Please use the`distinctField` prop instead.
151
159
152
160
### aggregationSize
153
161
To set the number of buckets to be returned by aggregations.
@@ -247,6 +255,15 @@ accepts the label of the desired sort option to set default sort value from give
247
255
|`Number`| Yes |
248
256
249
257
number of results to show per view. Defaults to 10.
258
+
259
+
### candidates
260
+
261
+
| Type | Optional |
262
+
|------|----------|
263
+
|`Number`| Yes |
264
+
265
+
number of candidate values (aka k) to retrieve for kNN search. This is used with kNN search.
266
+
250
267
### loader
251
268
252
269
| Type | Optional |
@@ -307,25 +324,23 @@ Read more about it [here](/docs/reactivesearch/react/advanced/customqueries/#whe
307
324
returns a list element object to be rendered based on the `res` data object. This callback function prop is called for each data item rendered in the **ReactiveList** component's view. For example,
Copy file name to clipboardExpand all lines: content/docs/reactivesearch/react/search/searchbox.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,7 @@ Example uses:
47
47
"weight":3
48
48
}
49
49
]}
50
+
vectorDataField="vector_data" # Only one of dataField or vectorDataField is needed
50
51
title="Search"
51
52
mode="tag"// accepts either of 'select' or 'tag', defaults to 'select'
52
53
defaultValue="Songwriting"
@@ -182,8 +183,13 @@ type DataField = {
182
183
```
183
184
database field(s) to be queried against. Accepts an Array in addition to String, useful for applying search across multiple fields. Check examples at [here](/docs/search/reactivesearch-api/reference/#datafield).
184
185
185
-
> Note:
186
-
The `dataField` property as `DataField` object is only available for ReactiveSearch version >= `v3.21.0` and Appbase version `v7.47.0`.
186
+
### vectorDataField
187
+
188
+
| Type | Optional |
189
+
|------|----------|
190
+
|`String`| Yes |
191
+
192
+
vector data field to query for retrieving hits for the component's UI view. This is used when applying kNN search. Introduced in v3.4.0.
187
193
188
194
### size
189
195
@@ -192,6 +198,15 @@ The `dataField` property as `DataField` object is only available for ReactiveSea
192
198
|`Number`| Yes |
193
199
194
200
number of suggestions to show. Defaults to `10`.
201
+
202
+
### candidates
203
+
204
+
| Type | Optional |
205
+
|------|----------|
206
+
|`Number`| Yes |
207
+
208
+
number of candidate values (aka k) to retrieve for kNN search. This is used with kNN search for populating the suggestions view.
@@ -108,10 +110,18 @@ Accepts the following properties:
108
110
109
111
| Type | Optional |
110
112
|------|----------|
111
-
|`String`|No|
113
+
|`String`|Yes|
112
114
113
115
data field to be connected to the component's UI view. It is useful for providing a **sorting** context i.e. results would be sorted based on the `dataField`.
114
116
117
+
### vectorDataField
118
+
119
+
| Type | Optional |
120
+
|------|----------|
121
+
|`String`| Yes |
122
+
123
+
vector data field to query for retrieving hits for the component's UI view. This is used when applying kNN search. Introduced in v4.3.0.
124
+
115
125
### aggregationSize
116
126
To set the number of buckets to be returned by aggregations.
117
127
@@ -204,6 +214,15 @@ accepts the label of the desired sort option to set default sort value from give
204
214
|`Number`| Yes |
205
215
206
216
number of results to show per view. Defaults to 10.
217
+
218
+
### candidates
219
+
220
+
| Type | Optional |
221
+
|------|----------|
222
+
|`Number`| Yes |
223
+
224
+
number of candidate values (aka k) to retrieve for kNN search. This is used with kNN search.
database field(s) to be queried against. Accepts an Array in addition to String, useful for applying search across multiple fields. Check examples at [here](/docs/search/reactivesearch-api/reference/#datafield).
207
209
208
-
> Note:
209
-
> 1. The `dataField` property as `DataField` object is only available for ReactiveSearch version >= `v3.0.0` and Appbase version `v7.47.0`.
210
+
### vectorDataField
211
+
212
+
| Type | Optional |
213
+
|------|----------|
214
+
|`String`| Yes |
215
+
216
+
vector data field to query for retrieving hits for the component's UI view. This is used when applying kNN search. Introduced in v3.4.0.
210
217
211
218
### size
212
219
@@ -215,6 +222,15 @@ database field(s) to be queried against. Accepts an Array in addition to String,
215
222
|`Number`| Yes |
216
223
217
224
number of suggestions to show. Defaults to `10`.
225
+
226
+
### candidates
227
+
228
+
| Type | Optional |
229
+
|------|----------|
230
+
|`Number`| Yes |
231
+
232
+
number of candidate values (aka k) to retrieve for kNN search. This is used with kNN search for populating the suggestions view.
0 commit comments