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
{{ message }}
This repository was archived by the owner on Mar 21, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: open-api.yaml
+113-3Lines changed: 113 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -176,6 +176,21 @@ components:
176
176
_geoDistance:
177
177
type: number
178
178
description: 'Using _geoPoint({lat}, {lng}) built-in sort rule at search leads the engine to return a _geoDistance within the search results. This field represents the distance in meters of the document from the specified _geoPoint.'
179
+
facetHit:
180
+
type: object
181
+
additionalProperties: true
182
+
examples:
183
+
- value: Romance
184
+
count: 25
185
+
description: FacetHit object represents a matched facet value for a facet search.
186
+
properties:
187
+
value:
188
+
type: string
189
+
description: The facet value being matched.
190
+
additionalProperties: true
191
+
count:
192
+
type: integer
193
+
description: The number of document containing the matched facet value.
179
194
documentId:
180
195
oneOf:
181
196
- type: number
@@ -306,6 +321,27 @@ components:
306
321
- hits
307
322
- processingTimeMs
308
323
- query
324
+
facetSearchResponse:
325
+
type: object
326
+
additionalProperties: false
327
+
title: ''
328
+
properties:
329
+
facetHits:
330
+
type: array
331
+
description: Array of facet hits
332
+
items:
333
+
$ref: '#/components/schemas/facetHit'
334
+
facetQuery:
335
+
type: string
336
+
description: Facet query originating the response.
337
+
example: ninja
338
+
processingTimeMs:
339
+
type: integer
340
+
description: Processing time of the facet search query.
341
+
required:
342
+
- facetHits
343
+
- facetQuery
344
+
- processingTimeMs
309
345
task:
310
346
type: object
311
347
description: |
@@ -762,7 +798,37 @@ components:
762
798
attributesToHighlight:
763
799
- overview
764
800
showMatchesPosition: true
765
-
wordsMatchingStrategy: all
801
+
matchingStrategy: all
802
+
facetSearchQuery:
803
+
type: object
804
+
additionalProperties: false
805
+
properties:
806
+
facetName:
807
+
type: string
808
+
required: true
809
+
description: Query string.
810
+
example: '"genres"'
811
+
facetQuery:
812
+
type: string
813
+
description:
814
+
default: '""'
815
+
example: '"Horror"'
816
+
q:
817
+
type: string
818
+
description: 'Additional search parameter. If additional search parameters are set, the method will return facet values that both: - Match the face query - Are contained in the records matching the additional search parameters'
819
+
default: '""'
820
+
example: '"Back to the future"'
821
+
matchingStrategy:
822
+
type: string
823
+
description: 'Additional search parameter. If additional search parameters are set, the method will return facet values that both: - Match the face query - Are contained in the records matching the additional search parameters'
824
+
default: 'last'
825
+
filter:
826
+
$ref: '#/components/schemas/filter'
827
+
examples:
828
+
Example:
829
+
value:
830
+
facetName: genres
831
+
facetQuery: Romance
766
832
error:
767
833
title: error
768
834
type: object
@@ -1315,11 +1381,13 @@ tags:
1315
1381
[Learn more about documents](https://docs.meilisearch.com/learn/core_concepts/documents.html).
1316
1382
- name: Search
1317
1383
description: |
1318
-
Meilisearch exposes 3 routes to perform searches:
1384
+
Meilisearch exposes 3 routes to perform document searches:
1319
1385
* A POST route: this is the preferred route when using API authentication, as it allows [preflight request](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) caching and better performances.
1320
1386
* A GET route: the usage of this route is discouraged, unless you have good reason to do otherwise (specific caching abilities for example).
1321
1387
Other than the differences mentioned above, the two routes are strictly equivalent.
1322
1388
* A POST multi-search route allowing to perform multiple search queries in a single HTTP request.
1389
+
Meilisearch exposes 1 route to perform facet searches:
1390
+
* A POST facet-search route allowing to perform a facet search query on a facet in a single HTTP request.
1323
1391
- name: Tasks
1324
1392
description: |
1325
1393
The `tasks` route gives information about the progress of the [asynchronous operations](https://docs.meilisearch.com/learn/advanced/asynchronous_operations.html).
@@ -2182,6 +2250,48 @@ paths:
2182
2250
- $ref: '#/components/parameters/Content-Type'
2183
2251
parameters:
2184
2252
- $ref: '#/components/parameters/indexUid'
2253
+
'/indexes/{indexUid}/facet-search':
2254
+
post:
2255
+
operationId: indexes.documents.facet.search
2256
+
summary: Facet Search
2257
+
description: |
2258
+
Search for facet values matching a specific query for a facet. When many values exist for a facet, users need to be able to discover non-show values they can select in order to refine their faceted search.
Copy file name to clipboardExpand all lines: text/0034-telemetry-policies.md
+23-5Lines changed: 23 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,6 +40,7 @@ The collected data is sent to [Segment](https://segment.com/). Segment is a plat
40
40
| Launched | Occurs when MeiliSearch is launched the first time. |
41
41
| Documents Searched POST | Aggregated event on all received requests via the `POST` - `indexes/:indexUid/search` route during one hour or until a batch size reaches `500Kb`. |
42
42
| Documents Searched GET | Aggregated event on all received requests via the `GET` - `/indexes/:indexUid/search` route during one hour or until a batch size reaches `500Kb`. |
43
+
| Facet Searched POST | Aggregated event on all received requests via the `POST` - `/indexes/:indexUid/facet-search` route during one hour or until a batch size reaches `500Kb`. |
43
44
| Documents Searched by Multi-Search POST | Aggregated event on all received requests via the `POST`- `/multi-search` route during one hour or until a batch size reaches `500Kb`. |
44
45
| Documents Added | Aggregated event on all received requests via the `POST` - `/indexes/:indexUid/documents` route during one hour or until a batch size reaches `500Kb`. |
45
46
| Documents Updated | Aggregated event on all received requests via the `PUT` - `/indexes/:indexUid/documents` route during one hour or until a batch size reaches `500Kb`. |
@@ -111,11 +112,11 @@ The collected data is sent to [Segment](https://segment.com/). Segment is a plat
111
112
|`stats.database_size`| Database size. Expressed in `Bytes`| 2621440 | Every hour |
112
113
|`stats.indexes_number`| Number of indexes | 2 | Every hour |
113
114
|`start_since_days`| Number of days since instance was launched | 365 | Every hour |
|`requests.99th_response_time`| Highest latency from among the fastest 99% of successful search requests | 57ms |`Documents Searched POST`, `Documents Searched GET`|
116
-
|`requests.total_succeeded`| Total number of successful requests in this batch | 3456 |`Documents Searched POST`, `Documents Searched GET`, `Documents Searched by Multi-Search POST`|
117
-
|`requests.total_failed`| Total number of failed requests in this batch | 24 |`Documents Searched POST`, `Documents Searched GET`, `Documents Searched by Multi-Search POST`|
118
-
|`requests.total_received`| Total number of received requests in this batch | 3480 |`Documents Searched POST`, `Documents Searched GET`, `Documents Deleted`, `Documents Fetched GET`, `Documents Fetched POST`, `Health Seen`, `Tasks Seen`, `Documents Searched by Multi-Search POST`|
|`requests.99th_response_time`| Highest latency from among the fastest 99% of successful search requests | 57ms |`Documents Searched POST`, `Documents Searched GET`, `Facet Searched POST`|
117
+
|`requests.total_succeeded`| Total number of successful requests in this batch | 3456 |`Documents Searched POST`, `Documents Searched GET`, `Facet Searched POST`, `Documents Searched by Multi-Search POST`|
118
+
|`requests.total_failed`| Total number of failed requests in this batch | 24 |`Documents Searched POST`, `Documents Searched GET`, `Facet Searched POST`, `Documents Searched by Multi-Search POST`|
119
+
|`requests.total_received`| Total number of received requests in this batch | 3480 |`Documents Searched POST`, `Documents Searched GET`, `Facet Searched POST`, `Documents Deleted`, `Documents Fetched GET`, `Documents Fetched POST`, `Health Seen`, `Tasks Seen`, `Documents Searched by Multi-Search POST`|
119
120
|`sort.with_geoPoint`|`true` if the sort rule `_geoPoint` was used in this batch, otherwise `false`| true |`Documents Searched POST`, `Documents Searched GET`|
120
121
|`sort.avg_criteria_number`| Average number of sort criteria among all requests containing the `sort` parameter in this batch | 2 |`Documents Searched POST`, `Documents Searched GET`|
121
122
|`filter.with_geoRadius`|`true` if the filter rule `_geoRadius` was used in this batch, otherwise `false`| false |`Documents Searched POST`, `Documents Searched GET`|
@@ -186,6 +187,8 @@ The collected data is sent to [Segment](https://segment.com/). Segment is a plat
186
187
|`per_batch`|`true` if `POST /indexes/:indexUid/documents/delete-batch` endpoint was used in this batch, otherwise `false`| false |`Documents Deleted`|
187
188
|`per_filter`|`true` if `POST /indexes/:indexUid/documents/delete` endpoint was used in this batch, otherwise `false`| false |`Documents Fetched GET`, `Documents Fetched POST`, `Documents Deleted`|
188
189
|`clear_all`|`true` if `DELETE /indexes/:indexUid/documents` endpoint was used in this batch, otherwise `false`| false |`Documents Deleted`|
190
+
|`facets.total_distinct_facet_count`| The total number of distinct facets queried for the aggregated event |`3`|`Facet Searched POST`|
191
+
|`facets.additional_search_parameters_provided`| Were additional search parameters provided for the aggregated event |`true`|`Facet Searched POST`|
189
192
190
193
----
191
194
@@ -316,6 +319,21 @@ This property allows us to gather essential information to better understand on
316
319
| facets.avg_facets_number | The average number of facets among all the requests containing the `facets` parameter in the aggregated event. `"facets": []` equals to `0` while not sending `facets` does not influence the average in the aggregated event. |`10`|
317
320
| matching_strategy.most_used_strategy | Most used word matching strategy among all search requests in the aggregated event. `last` / `all`|`last`|
318
321
322
+
---
323
+
#### `Facet Searched POST`
324
+
325
+
> The Facet Searched event is sent once an hour or when a batch reaches the maximum size of `500kb`. The event's properties are averaged over all requests on `POST` - `/indexes/:indexUid/facet-search`.
326
+
327
+
| Property name | Description | Example |
328
+
|---------------|-------------|---------|
329
+
| user_agent | Represents all the user-agents encountered on this endpoint in the aggregated event.|`["Meilisearch Ruby (v2.1)", "Ruby (3.0)"]`|
330
+
| requests.99th_response_time | Highest latency from among the fastest 99% of successful search requests. |`57ms`|
331
+
| requests.total_succeeded | The total number of succeeded search requests in the aggregated event. |`3456`|
332
+
| requests.total_failed | The total number of failed search requests in the aggregated event. |`24`|
333
+
| requests.total_received | The total number of received search requests in the aggregated event. |`3480`|
334
+
| facets.total_distinct_facet_count | The total number of distinct facets queried for the aggregated event. |`3`|
335
+
| facets.additional_search_parameters_provided | Were additional search parameters provided for the aggregated event. |`true`|
0 commit comments