Skip to content

Adding details field to Task class #331

@alallema

Description

@alallema

The Java class Task which retrieves the response from Meilisearch for a task contains these fields:

    protected String status = "";
    protected int uid = 0;
    protected String indexUid = "";
    protected String type = null;
    protected String duration = "";
    protected Date enqueuedAt = null;
    protected Date startedAt = null;
    protected Date finishedAt = null;
    protected TaskError error = null;

But the actual response send by Meilisearch is like:

{
	"uid": 225,
	"indexUid": "WaitForTaskTimoutInMs",
	"status": "succeeded",
	"type": "documentAddition",
	"details": {
		"receivedDocuments": 30,
		"indexedDocuments": 30
	},
	"duration": "PT0.031713875S",
	"enqueuedAt": "2022-01-26T16:54:46.993341418Z",
	"startedAt": "2022-01-26T16:54:46.995596001Z",
	"finishedAt": "2022-01-26T16:54:47.027309876Z"
},

It should be more accurate to add a details field to the Task class to be able to have the entire answer from the Meilisearch API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions