-
Notifications
You must be signed in to change notification settings - Fork 556
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
Advanced Search #18501
Comments
Thanks, @nathansandi, for this proposal 👍
You can have a look at https://restdb.io/docs/querying-with-the-api as an example. If you're unsure about any of those things, we can use this proposal space to discuss it or use any other document. Please also clarify where you'd like such discussions to happen, here in the issue or in the Google Doc. Thank you! p.s.: I adjusted the proposal description to separate background information from the final proposal for the API. You can also use a slide deck to describe the operators if you like, for example. |
Thank you :) I am defntelly gonna work on this ASAP @tmetzke in the most detailed way. |
@tmetzke I have added the informations, I focused this issue from now only on the chosen proposal, in order to keep the focus to refine the Proposal 3 from the document, so this is the reason I have created the issue over here. So I would like focus the discussions here, once the document was between more proposals, and now I am presenting the final one. |
Thanks, @nathansandi, reads a lot better now and is clearer, nice job 👍 I noticed the following things:
Again, really good direction already 👍 |
I agree with the sugegstions, I updated there, I prefer without $eq to make equality explicit, because many users are familiar with the tradition way to query, and equality would force them adapt to a different way to setup the API. What do you think? |
Thanks for updating, @nathansandi 👍
The explicit operator The other definitions look good to me so far 👍 |
@nathansandi As we briefly discussed on zoom last week, I am wondering about the impact of this proposal. Is this only meant to apply to the task search endpoint in our new API or are we aiming at having this for all other search endpoints as well? I believe it was meant for the task endpoint only, but would love to clear that up to be sure it's not supposed to be part of every search endpoint. In the back of my head I'm thinking about the identity endpoints we would like to make compliant with the |
@steff46, this is a general proposal for all C8 REST endpoints. If accepted and documented in the guidelines, this will be the standard for all search endpoints offering advanced search. However, how we execute this new guideline, is a different topic. We can iteratively roll this out to specific endpoints, for example. Having the guideline does not imply all search endpoints must implement this immediately. In the long run, though, all search endpoints should support this unless it doesn't make sense for them. |
The exact execution also is a product decision, driven by @aleksander-dytko as the general DRI for the C8 REST API. Having the guideline in 8.6, for example, does not imply implementation in 8.6 as well. |
Thanks @tmetzke ... I thought we were aiming at having the API in place in 8.6 fully compliant with ... or better fully implementing the guideline. Sorry for the misunderstanding. |
All good, that is the goal for the current state of the guidelines. We need to make clear what needs to be considered for the endpoints for 8.6 if we update the guidelines in between 👍 |
@tmetzke Just an additional point, I was having a chat with @steff46 , and maybe we should take in consideration also if all search endpoints really required advanced search mechanisms. Like user case. We know users requires a lot for Task Search (From the Tasklist perspective), but maybe not the same for Users endpoint. So in case the propose advances, we do not need change all search endpoints at once, but do it incrementally (at least from my perspective), giving priority for the Task API, once there are a high number of requests from the community for those advanced resources for Task. But I agree this decision is up to the DRI. cc: @aleksander-dytko |
We always strive to build things incrementally. I consider this a base value in the engineering department. Thus, adopting this with priority in one endpoint first (e.g. task search) makes sense. |
Good work @nathansandi. I see Advanced Queries potentially to take advantage of the streamlining project and with a "helper" that makes the implementation easier (based on configuration, class abstraction, etc) so the adoption after the initial implementation should be smooth by any other method that needs that - we already talked a lot about this topic so from my part, I'm ok with the output :) |
Hi @nathansandi, I see a huge value in providing the Advanced Search Query capabilities in our C8 API. Great job on the proposal and the whole research project! ⭐ I just have a few minor questions/suggestions:
|
Thanks for the review and comments @aleksander-dytko, lets jump over the questions.
We can follow this as a standard, my concern here, besides tasklist, is there user case that users will need advance query for processes (for example). Again, I am not against it, just considering the complexity of the implementation for endpoints that may not be really necessary have a complex mechanism as Tasks. Apart of that, I am going to update the description to make it more clear. I think this also solve the point mentioned on the question (4)
I havent added more operators for variable, because we have a limitation over the data types. On the current state, variables are saved as
I have no strong preference on that, It is more to keep users close to what they already have today. But with this solution we are going to a path with similar complexity to Rest API query language. I will update the proposal with the inclusion of equals and not equals. cc: @tmetzke |
Thanks for considering the comments @nathansandi !
That's a good point. When thinking about this one again, we should explicitly add this to the API guidelines and use it when the endpoint requires advanced search. So, by default, we don't implement advanced search but rather when there is a specific need for it. With 8.6, we can provide this for specified endpoints (like Tasks, Variables, process instances) and then later act on the feedback. We would need to mention this rule in our docs to create clear expectations and guarantees for customers.
My concern was more about the Next steps:I would ask @romansmirnov for the last round of review to double-check if we haven't missed anything important. After that is done, @nathansandi could you contribute this to the guideline document? |
Thank you for the proposal. From my point of view the proposal is missing filtering string values by |
Good ideas, @dlavrenuek 👍 Regarding,
|
What WE need is the ability to search as So my suggestion is to allow following syntax with
This should also not block us from adding regex support in the future if we want to. This could be done by an additional query |
Makes loads of sense, I like the Great idea also to add a separate operation |
Description
The business problem that we are trying to solve is to have an easy yet expressive way for users to search/filter Camunda entities, allowing them, for example, to search using logical (AND, OR, IN) and comparison operators (gt, lt, gte, lte).
This allows our Search endpoints to build custom filters that support defining fine-grained, effective result sets. Plus, other components can reuse this if they need an API for advanced search.
Final proposal
We had 3 proposals listed on this document: https://docs.google.com/document/d/1k_xze5QLnKdNhF2ecwrzhawMscVi1-B-irE1GgwwUnM/edit , this is a final proposal, as output of the user interviews.
Main points extracted from the interviews:
More details on the interview feedback:
https://docs.google.com/document/d/1ZLlwESNSkZtzUcRFuJVXjbO162xIIhnW2RF0Egi8-GU/edit?usp=sharing
The goal of this issue is follow up with the Proposal 3, with concise operator definitions, reading similar to C7, allowing arbitrary filter options
Example:
Task Variable Search
The
taskVariables
notation provides a method to search and filter tasks based on their associated variables, enabling a more granular and precise query. Variables in this context refer to custom data points or attributes assigned to tasks within the Camunda system. By using thetaskVariables.<variableName>
format, users can specify which variable they want to filter on.Example
Conditional Operations
Equality Check
$eq
field: { "$eq": value }
field
is equal tovalue
.$neq
field: { "$neq": value }
field
is not equal tovalue
.Comparison Operations
The Comparison operations will support the follow data type:
$gte
field: { "$gte": value }
field
is greater than or equal tovalue
.$gt
field: { "$gt": value }
field
is greater thanvalue
.$lte
field: { "$lte": value }
field
is less than or equal tovalue
.$lt
field: { "$lt": value }
field
is less thanvalue
.Logical Operations
All filter options in the root element, outside of
$or
elements, are connected asAND
.$or
"$or": [ {condition1}, {condition2} ]
and
field: test
or
will be considered as an "and"IN
We will support only Strings on IN operations
field: { "$in": [value1, value2] }
field
is one of the values in the provided array.Acknowledgment:
The text was updated successfully, but these errors were encountered: