Skip to content

fix: Enhance some docs instructions #181

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/cmd/dictionary/entries/import/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ func NewImportCmd(f *cmdutil.Factory, runF func(*ImportOptions) error) *cobra.Co
Short: "Import dictionary entries from a file to the specified index",
Long: heredoc.Doc(`
Import dictionary entries from a file to the specified index.

The file must contains one single JSON object per line (newline delimited JSON objects - ndjson format: https://ndjson.org/).
The file must contain one JSON object per line - in newline-delimited JSON (NDJSON) format: https://ndjson.org/.
`),
Example: heredoc.Doc(`
# Import entries from the "entries.ndjson" file to the "stopwords" dictionary
Expand Down
4 changes: 3 additions & 1 deletion pkg/cmd/objects/import/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ func NewImportCmd(f *cmdutil.Factory) *cobra.Command {
Short: "Import records into an index",
Long: heredoc.Doc(`
Import records into the specified index from a file or the standard input.
The file must contain one JSON object per line (newline delimited JSON objects - ndjson format: https://ndjson.org/).
The file must contain one JSON object per line - in newline-delimited JSON (NDJSON) format: https://ndjson.org/.

The CLI will create a new index if the specified index doesn't exist
`),
Example: heredoc.Doc(`
# Import records from the "data.ndjson" file into the "MOVIES" index
Expand Down
2 changes: 1 addition & 1 deletion pkg/cmd/objects/operations/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func NewOperationsCmd(f *cmdutil.Factory, runF func(*OperationsOptions) error) *
Long: heredoc.Doc(`
Perform several indexing operations

The file must contains one single JSON object per line (newline delimited JSON objects - ndjson format: https://ndjson.org/).
The file must contain one JSON object per line - in newline-delimited JSON (NDJSON) format: https://ndjson.org/.
Each JSON object must be a valid indexing operation, as documented in the REST API documentation: https://www.algolia.com/doc/rest-api/search/#batch-write-operations-multiple-indices
`),
Example: heredoc.Doc(`
Expand Down
5 changes: 3 additions & 2 deletions pkg/cmd/objects/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ func NewUpdateCmd(f *cmdutil.Factory, runF func(*UpdateOptions) error) *cobra.Co
Short: "Update an index with records from a file",
Long: heredoc.Doc(`
Update a specified index with records from a file.

The file must contains one JSON object per line (newline delimited JSON objects - ndjson format: https://ndjson.org/).
The file must contain one JSON object per line - in newline-delimited JSON (NDJSON) format: https://ndjson.org/.

If an attribute is missing in the import file, the original attribute value is retained.
`),
Example: heredoc.Doc(`
# Update the "MOVIES" index with records from the "objects.ndjson" file
Expand Down
6 changes: 3 additions & 3 deletions pkg/cmd/rules/import/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ func NewImportCmd(f *cmdutil.Factory, runF func(*ImportOptions) error) *cobra.Co
Annotations: map[string]string{
"acls": "editSettings",
},
Short: "Import Rules into an index.",
Short: "Import rules into an index.",
Long: heredoc.Doc(`
Import Rules into an index.
File imports must contain one JSON rule per line (newline delimited JSON objects - ndjson format: https://ndjson.org/).
Import rules into an index.
The file must contain one JSON object per line - in newline-delimited JSON (NDJSON) format: https://ndjson.org/.
`),
Example: heredoc.Doc(`
# Import rules from the "rules.ndjson" file to the "MOVIES" index
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmd/synonyms/import/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ func NewImportCmd(f *cmdutil.Factory, runF func(*ImportOptions) error) *cobra.Co
},
Short: "Import synonyms to the index",
Long: heredoc.Doc(`
Import synonyms to the provided index.
The file must contains one single JSON synonym per line (newline delimited JSON objects - ndjson format: https://ndjson.org/).
Import synonyms to the specified index.
The file must contain one JSON object per line - in newline-delimited JSON (NDJSON) format: https://ndjson.org/.
`),
Example: heredoc.Doc(`
# Import synonyms from the "synonyms.ndjson" file to the "MOVIES" index
Expand Down
Loading