-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure Csv delimiter #424
Conversation
Linter tests are failing |
f7cb103
to
a858022
Compare
if err != nil { | ||
return nil, err | ||
} | ||
return resp, nil | ||
} | ||
|
||
func (i Index) saveDocumentsFromReaderInBatches(documents io.Reader, batchSize int, documentsCsvFunc func(recs []byte, pk ...string) (resp *TaskInfo, err error), primaryKey ...string) (resp []TaskInfo, err error) { | ||
func (i Index) saveDocumentsFromReaderInBatches(documents io.Reader, batchSize int, documentsCsvFunc func(recs []byte, op *CsvDocumentsQuery) (resp *TaskInfo, err error), options *CsvDocumentsQuery) (resp []TaskInfo, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this method only used for CSV?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that why there is documentsCsvFunc
in the parameters too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok! It was not very clear per the function name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥🔥🔥🔥
427: Update version for the next release (v0.24.0) r=bidoubiwa a=meili-bot This version makes this package compatible with Meilisearch v1.1 🎉 Check out the changelog of [Meilisearch v1.1](https://github.com/meilisearch/meilisearch/releases/tag/v1.1.0) for more information on the changes. ## 🐛 Bug Fixes - Fills the client field for each index entry returned by GetIndexes (#426) `@candiduslynx` ##⚠️ Breaking changes - Add the ability to provide a specific `csv-delimiter` when adding and updating documents in CSV format (#424) `@alallema` - New type `CsvDocumentsQuery{}` - Changed `AddDocumentsCsv()` which takes `CsvDocumentsQuery` as a parameter instead of a `...string` - Changed `AddDocumentsCsvInBatches()` which takes `CsvDocumentsQuery` as a parameter instead of a `...string` - Changed `UpdateDocumentsCsv()` which takes `CsvDocumentsQuery` as a parameter instead of a `...string` - Changed `UpdateDocumentsCsvInBatches()` which takes `CsvDocumentsQuery` as a parameter instead of a `...string` ## 🚀 Enhancements - Add FacetStats field in SearchResponse (#423) `@alallema` - New method `client.MultiSearch()` provides the possibility to make multiple requests at once (#422) `@alallema` Example: ```go client.MultiSearch(&MultiSearchRequest{ Queries: []SearchRequest{ { IndexUID: "movies", Query: "pooh", Limit: 5, }, { IndexUID: "movies", Query: "nemo", Limit: 5, }, { IndexUID: "movie_ratings", Query: "us", }, }, }) ``` Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com>
418: Changes related to the next Meilisearch release (v1.1.0) r=bidoubiwa a=meili-bot Related to this issue: meilisearch/integration-guides#251 This PR: - gathers the changes related to the next Meilisearch release (v1.1.0) so that this package is ready when the official release is out. - should pass the tests against the [latest pre-release of Meilisearch](https://github.com/meilisearch/meilisearch/releases). - might eventually contain test failures until the Meilisearch v1.1.0 is out.⚠️ This PR should NOT be merged until the next release of Meilisearch (v1.1.0) is out. _This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/main/resources/pre-release-week.md) purpose._ Done: - #422 - #423 - #424 Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com> Co-authored-by: alallema <amelie@meilisearch.com> Co-authored-by: Amélie <alallema@users.noreply.github.com>
Add the ability to provide a CSV delimiter for adding and updating CSV documents as in the specification
SDK requirements: meilisearch/integration-guides#251
All these methods taking
CSV
have changedChanges:
CsvDocumentsQuery{}
AddDocumentsCsv(documents []byte, primaryKey ...string) (resp *TaskInfo, err error)
->
AddDocumentsCsv(documents []byte, options *CsvDocumentsQuery) (resp *TaskInfo, err error)
AddDocumentsCsvInBatches(documents []byte, batchSize int, primaryKey ...string) (resp []TaskInfo, err error)
->
AddDocumentsCsvInBatches(documents []byte, batchSize int, options *CsvDocumentsQuery) (resp []TaskInfo, err error)
UpdateDocumentsCsv(documents []byte, primaryKey ...string) (resp *TaskInfo, err error)
->
UpdateDocumentsCsv(documents []byte, options *CsvDocumentsQuery) (resp *TaskInfo, err error)
UpdateDocumentsCsvInBatches(documents []byte, batchSize int, primaryKey ...string) (resp []TaskInfo, err error)
->
UpdateDocumentsCsvInBatches(documents []byte, batchSize int, options *CsvDocumentsQuery) (resp []TaskInfo, err error)