Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Apply naming changes for facet distribution and showing matches position
Browse files Browse the repository at this point in the history
  • Loading branch information
gmourier committed Jul 7, 2022
1 parent ba4d4ee commit 62841ee
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 50 deletions.
48 changes: 24 additions & 24 deletions open-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ components:
overview: 'When a scientists daughter is kidnapped, American Ninja, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the ninja.'
release_date: '1993-01-01'
description: 'A document made of attribute. The maximum number of attribute for a document is 65,535.'
matchesInfo:
matchesPosition:
type: object
properties:
start:
Expand All @@ -113,7 +113,7 @@ components:
poster: 'https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg'
overview: 'When a scientists daughter is kidnapped, American <em>Ninja</em>, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the <em>ninja</em>.'
release_date: '1993-01-01'
_matchesInfo:
_matchesPosition:
overview:
- start: 49
length: 5
Expand All @@ -131,7 +131,7 @@ components:
poster: 'https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg'
overview: 'When a scientists daughter is kidnapped, American <em>Ninja</em>, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the <em>ninja</em>.'
release_date: '1993-01-01'
_matchesInfo:
_matchesPosition:
overview:
- start: 49
length: 5
Expand All @@ -143,12 +143,12 @@ components:
type: object
description: Only present if `attributesToHighlight`/`attributesToCrop` is not empty. Return highlighted and cropped fields.
additionalProperties: true
_matchesInfo:
_matchesPosition:
type: object
description: Only present if matches = `true`. Array of all search query occurrences in all fields.
description: Only present if showMatchesPosition = `true`. Array of all search query occurrences in all fields.
properties:
'':
$ref: '#/components/schemas/matchesInfo'
$ref: '#/components/schemas/matchesPosition'
attribute:
type:
- string
Expand Down Expand Up @@ -231,14 +231,14 @@ components:
estimatedTotalHits:
type: integer
description: Estimated number of candidates for the search query.
facetsDistribution:
facetDistribution:
type: object
additionalProperties:
type: object
additionalProperties:
type: integer
description: |
[Distribution of the given facets](https://docs.meilisearch.com/reference/features/search_parameters.html#facets-distribution).
[Distribution of the given facets](https://docs.meilisearch.com/reference/features/search_parameters.html#facet-distribution).
example:
genres:
action: 273
Expand Down Expand Up @@ -762,21 +762,21 @@ components:
example: 5
default: 10
description: Sets the total number of words to keep around the matched part of an attribute specified in the `attributesToCrop` parameter.
facetsDistribution:
name: facetsDistribution
facets:
name: facets
in: query
schema:
type: string
example: 'genres,author'
description: 'Comma-separated list of attributes whose fields will be distributed as a facet. If you have [set up filterableAttributes](https://docs.meilisearch.com/reference/features/settings.html#filterable-attributes), you can retrieve the count of matching terms for each facets.[Learn more about facet distribution in the dedicated guide](https://docs.meilisearch.com/reference/features/search_parameters.html#facets-distribution)'
matches:
name: matches
description: 'Comma-separated list of attributes whose fields will be distributed as a facet. If you have [set up filterableAttributes](https://docs.meilisearch.com/reference/features/settings.html#filterable-attributes), you can retrieve the count of matching terms for each facets.[Learn more about facet distribution in the dedicated guide](https://docs.meilisearch.com/reference/features/search_parameters.html#facet-distribution)'
showMatchesPosition:
name: showMatchesPosition
in: query
required: false
schema:
type: boolean
default: 'false'
description: Defines whether an `_matchesInfo` object that contains information about the matches should be returned or not.
description: Defines whether an `_matchesPosition` object that contains information about the matches should be returned or not.
sort:
name: sort
in: query
Expand Down Expand Up @@ -1425,12 +1425,12 @@ paths:
- $ref: '#/components/parameters/attributesToCrop'
- $ref: '#/components/parameters/cropMarker'
- $ref: '#/components/parameters/cropLength'
- $ref: '#/components/parameters/facetsDistribution'
- $ref: '#/components/parameters/facets'
- $ref: '#/components/parameters/filter'
- $ref: '#/components/parameters/offset'
- $ref: '#/components/parameters/sort'
- $ref: '#/components/parameters/limit'
- $ref: '#/components/parameters/matches'
- $ref: '#/components/parameters/showMatchesPosition'
responses:
'200':
description: Ok
Expand All @@ -1453,7 +1453,7 @@ paths:
poster: 'https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg'
overview: 'When a scientists daughter is kidnapped, American <em>Ninja</em>, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the <em>ninja</em>.'
release_date: '1993-01-01'
_matchesInfo:
_matchesPosition:
overview:
- start: 49
length: 5
Expand Down Expand Up @@ -1531,15 +1531,15 @@ paths:
type: number
description: Sets the total number of **words** to keep for the cropped part of an attribute specified in the `attributesToCrop` parameter.
default: 10
matches:
showMatchesPosition:
type: boolean
description: Defines whether an `_matchesInfo` object that contains information about the matches should be returned or not.
description: Defines whether an `_matchesPosition` object that contains information about the matches should be returned or not.
default: false
filter:
$ref: '#/components/schemas/filter'
facetsDistribution:
facets:
type: array
description: 'Array of attributes whose fields will be distributed as a facet. If you have [set up filterableAttributes](https://docs.meilisearch.com/reference/features/settings.html#filterable-attributes), you can retrieve the count of matching terms for each [facets](https://docs.meilisearch.com/reference/features/filtering_and_faceted_search.html#faceted-search).[Learn more about facet distribution in the dedicated guide](https://docs.meilisearch.com/reference/features/search_parameters.html#facets-distribution)'
description: 'Array of attributes whose fields will be distributed as a facet. If you have [set up filterableAttributes](https://docs.meilisearch.com/reference/features/settings.html#filterable-attributes), you can retrieve the count of matching terms for each [facets](https://docs.meilisearch.com/reference/features/filtering_and_faceted_search.html#faceted-search).[Learn more about facet distribution in the dedicated guide](https://docs.meilisearch.com/reference/features/search_parameters.html#facet-distribution)'
items:
type: string
example: '["genres", "author"]'
Expand All @@ -1561,7 +1561,7 @@ paths:
offset: 0
limit: 20
filter: (genres = Horror AND genres = Mystery) OR release_date > 523242000
facetsDistribution:
facets:
- genres
- author
attributesToRetrieve:
Expand All @@ -1572,7 +1572,7 @@ paths:
cropLength: 20
attributesToHighlight:
- overview
matches: true
showMatchesPosition: true
responses:
'200':
description: Ok
Expand All @@ -1595,7 +1595,7 @@ paths:
poster: 'https://image.tmdb.org/t/p/w1280/iuAQVI4mvjI83wnirpD8GVNRVuY.jpg'
overview: 'When a scientists daughter is kidnapped, American <em>Ninja</em>, attempts to find her, but this time he teams up with a youngster he has trained in the ways of the <em>ninja</em>.'
release_date: '1993-01-01'
_matchesInfo:
_matchesPosition:
overview:
- start: 49
length: 5
Expand Down
6 changes: 3 additions & 3 deletions text/0034-telemetry-policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ The collected data is sent to [Segment](https://segment.com/). Segment is a plat
| `formatting.highlight_post_tag` | `true` if `highlightPostTag` was used in this batch, otherwise `false` | false | `Documents Searched POST`, `Documents Searched GET` |
| `formatting.crop_length` | `true` if `cropLength` was used in this batch, otherwise `false` | false | `Documents Searched POST`, `Documents Searched GET` |
| `formatting.crop_marker` | `true` if `cropMarker` was used in this batch, otherwise `false` | false | `Documents Searched POST`, `Documents Searched GET` |
| `formatting.matches` | `true` if `matches` was used in this batch, otherwise `false` | false | `Documents Searched POST`, `Documents Searched GET` |
| `formatting.show_matches_position` | `true` if `showMatchesPosition` was used in this batch, otherwise `false` | false | `Documents Searched POST`, `Documents Searched GET` |
| `primary_key` | Value given for the `primaryKey` parameter if used, otherwise `null` | id | `Index Created`, `Index Updated`, `Documents Added`, `Documents Updated`|
| `payload_type` | All `payload_type` encountered in this batch | ["application/json", "text/plain", "application/x-ndjson"] | `Documents Added`, `Documents Updated` |
| `index_creation` | `true` if a document addition or update request triggered index creation in this batch, otherwise `false` | true | `Documents Added`, `Documents Updated` |
Expand Down Expand Up @@ -218,7 +218,7 @@ This property allows us to gather essential information to better understand on
| formatting.highlight_post_tag | Does `highlightPostTag` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
| formatting.crop_length | Does `cropLength` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
| formatting.crop_marker | Does `cropMarker` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
| formatting.matches | Does `matches` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
| formatting.show_matches_position | Does `showMatchesPosition` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |

---

Expand All @@ -245,7 +245,7 @@ This property allows us to gather essential information to better understand on
| formatting.highlight_post_tag | Does `highlightPostTag` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
| formatting.crop_length | Does `cropLength` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
| formatting.crop_marker | Does `cropMarker` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
| formatting.matches | Does `matches` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |
| formatting.show_matches_position | Does `showMatchesPosition` has been used in the aggregated event? If yes, `true` otherwise `false` | `false` |

---

Expand Down
Loading

0 comments on commit 62841ee

Please sign in to comment.