The ResourceController supports queries on GET /resource path. This is good for simple queries, such as:
Give me all the resources in the database
Give me all the resources where the fields match (or equal) a certain set of values.
Requests on GET /resource path are not good for complex queries, such as:
Give me the resources that are less than a specific value
Give me the resources that fall within a certain date range
This is because it is not easy to express complex queries via a URL query string. We therefore need to provide a improved mechanism that allows the client to execute complex queries. We will call this capability search.
The search capability should have the following key features:
It should allow the client to formulate complex queries.
It should allow the client to save complex queries for later usage.
The
ResourceController
supports queries onGET /resource
path. This is good for simple queries, such as:Requests on
GET /resource
path are not good for complex queries, such as:This is because it is not easy to express complex queries via a URL query string. We therefore need to provide a improved mechanism that allows the client to execute complex queries. We will call this capability
search
.The search capability should have the following key features: