-
Notifications
You must be signed in to change notification settings - Fork 115
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
Apply tasks changes #510
Apply tasks changes #510
Conversation
57340a3
to
235276c
Compare
} | ||
|
||
/** | ||
* Retrieves tasks from the client | ||
* Retrieves all TasksHandler at the specified index uid |
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.
Not sure if I got this... 👀
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.
I modify it's better?
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.
What I found strange was the TasksHandler
part. Maybe you want to Retrieves all tasks at the specified index uid
* @throws MeilisearchException if client request causes an error | ||
*/ | ||
TasksResults getTasks(String indexUid, TasksQuery param) throws MeilisearchException { | ||
String[] newIndexUid = new String[param.getIndexUid().length + 1]; |
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.
I'm not sure why you had to do this. Can you explain it to me, please?
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.
It's for this specific case:
TasksQuery query = new TasksQuery().setIndexes(new String[] {"books", "cities"});
client.index("movies").getTasks();
In case the getTasks()
method is called through the IndexesHandler
the request of this should be:
/tasks?indexUids=movies,books,cities
* @throws MeilisearchException if the client request causes an error | ||
*/ | ||
Task addDocuments(String uid, String document, String primaryKey) throws MeilisearchException { | ||
TaskInfo addDocuments(String uid, String document, String primaryKey) | ||
throws MeilisearchException { | ||
String urlQuery = "/indexes/" + uid + "/documents"; |
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.
You can apply the URLBuilder here :)
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 this one will be changed during PR about documents changes
11ce64d
to
d177640
Compare
d177640
to
6e8f0e2
Compare
fd81b25
to
ebb17dc
Compare
ebb17dc
to
5162345
Compare
5162345
to
67556ac
Compare
Pull Request
Related to: meilisearch/integration-guides#205
What does this PR do?
Breaking because enforces the users to use Meilisearch v0.28.0
Changes
GET /indexes/:indexUid/tasks
. UseGET /tasks?indexUid=:indexUid
instead.GET /indexes/:indexUid/tasks/:taskUid
. UseGET /tasks/:taskUid
instead.GET /tasks
we can filter by:type
,status
andindexUid
.status
like this:enqueued,processing
.index.getTask
now useGET /tasks/:task_uid
index.getTasks
now useGET/tasks?indexUid=movies
uid
field totaskUid
.index.getTasks
accept pagination metadata, added limit (default: 20), from.client.getTasks
accept pagination metadata, added limit (default: 20), from.TaskInfo
class to handle all response from asynchronous operationTasksQuery
class to handle pagination filteringTasksResults
class to retrieve responses fromgetTasks