Closed bserdar closed 7 years ago
Saved searches are first-class entities. Search the savedSearch entity.
On Tue, Jan 24, 2017 at 9:21 AM, Brandon Vulaj notifications@github.com wrote:
@bvulaj commented on this pull request.
In crud/src/main/java/com/redhat/lightblue/rest/crud/ AbstractCrudResource.java https://github.com/lightblue-platform/lightblue-rest/pull/278#pullrequestreview-18200683 :
@@ -78,6 +90,108 @@ java.security.Security.setProperty("networkaddress.cache.ttl", "30"); }
- @GET
- @Path("/search/{searchName}/{entity}")
- public Response runSavedSearch(@PathParam("searchName") String searchName,
Is there someway to get a list of available searches?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lightblue-platform/lightblue-rest/pull/278#pullrequestreview-18200683, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgDDQn3ihWykvzrqavKjWnImURLSv-Iks5rViUkgaJpZM4LsXls .
@bserdar so how would that work, then?
/search/getById/user? /search/getById/product?
What if I wanted to see available searches for user? Do I have to write an lb query to filter?
I guess what I am getting at is that it might make more sense to users to expose the searches underneath their respective entity.
/search/user/getById
I agree, /search/user/getById is better. Pushed a change for that.
Should I add APIs to get list of searches, etc? Currently you can do that with:
/find/savedSearch?Q=entity:user
On Tue, Jan 24, 2017 at 9:33 AM, Brandon Vulaj notifications@github.com wrote:
@bserdar https://github.com/bserdar so how would that work, then?
/search/getById/user? /search/getById/product?
What if I wanted to see available searches for user? Do I have to write an lb query to filter?
I guess what I am getting at is that it might make more sense to users to expose the searches underneath their respective entity.
/search/user/getById
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lightblue-platform/lightblue-rest/pull/278#issuecomment-274857244, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgDDQKgkGRYn06ZjUQlPLOuSPgBC8Gyks5rVifQgaJpZM4LsXls .
I think it would be nice if /search/user
returned a list of searches. It's a convenience method, but I think it makes sense.
This doesn't, but /searches/entity/version does. That's why I changed that to searches. Or, I can remove the API with the version, and keep this as /search/{entity}
On Tue, Jan 24, 2017 at 11:14 AM, Brandon Vulaj notifications@github.com wrote:
@bvulaj commented on this pull request.
In crud/src/main/java/com/redhat/lightblue/rest/crud/ AbstractCrudResource.java https://github.com/lightblue-platform/lightblue-rest/pull/278#pullrequestreview-18228216 :
@@ -78,6 +93,156 @@ java.security.Security.setProperty("networkaddress.cache.ttl", "30"); }
- @GET
- @LZF
- @Path("/searches/{entity}")
I think I would just keep this as search rather than change verbiage. I think that makes sense. It shouldn't clash with any of the actual search methods.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lightblue-platform/lightblue-rest/pull/278#pullrequestreview-18228216, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgDDfCPMEbtMgDCYyxaztnm8IEuNKNqks5rVj9sgaJpZM4LsXls .
I think that makes more sense in the long run. Let's go with that, if you're okay with it, and then merge this in.
Pushed.
On Tue, Jan 24, 2017 at 11:36 AM, Brandon Vulaj notifications@github.com wrote:
I think that makes more sense in the long run. Let's go with that, if you're okay with it, and then merge this in.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/lightblue-platform/lightblue-rest/pull/278#issuecomment-274894499, or mute the thread https://github.com/notifications/unsubscribe-auth/ADgDDbFzsRKg9PDZXvzbJ6NbHuXsydSPks5rVkS_gaJpZM4LsXls .
Saved searches are specific to an entity. There can be a getById for user, and getById for product, different searches.
On Tue, Jan 24, 2017 at 9:22 AM, Brandon Vulaj notifications@github.com wrote: