-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
417: [1.4.0] Refactor Settings and Add Pagination, Separator and Dictionary Settings r=curquiza a=Sherlouk # Pull Request ## Related issue Fixes #308 Fixes changes raised under meilisearch/integration-guides#286 (#406) -⚠️ Wait for v1.4.0 ## What does this PR do? - Refactors index settings to improve reuse (functionally identical, but around 300 less lines of code) - Cleaning up some unsafe practices in unit tests - Adds support for three new types of index-level settings (improving parity) All integration tests have been run against v1.4.0 (pre-release) RC 2 and is running locally. CI uses the latest version of the executable (1.3.0) and thus will not work and will throw errors. This is expected. This PR won't be merged until after the 1.4.0 release due to Swift being a tier 3 project, as such we can simply re-run CI once that's released. This PR starts to contain a little bit of cleanup with some various nit picks (nothing that changes the code style though). ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! Co-authored-by: James Sherlock <[email protected]>
- Loading branch information
Showing
12 changed files
with
944 additions
and
535 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Foundation | ||
|
||
/** | ||
`Pagination` is a wrapper used in the index pagination setting routes to handle the returned data. | ||
*/ | ||
public struct Pagination: Codable, Equatable { | ||
/// The maximum number of hits (document records) which can be returned by a single search request. | ||
/// By default, Meilisearch returns 1000 results per search. This limit protects your database from malicious scraping. | ||
public let maxTotalHits: Int | ||
|
||
public init(maxTotalHits: Int) { | ||
self.maxTotalHits = maxTotalHits | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.