ISSUE-45: Introduce hydra:filter (subPropertyOf hydra:search)

> There are use cases like Ruben's Linked Data Fragments which need to filter
> collections. hydra:search is deliberately fuzzy to not restrict its usage
> unnecessarily and thus not always suitable. Sometimes it is necessary to
> filter a collection's members based on the value of their properties (not
> properties of their properties or similar things). To enable such use cases,
> a specialized subproperty of hydra:search could be introduced. The semantics
> would be that a template (pseudo-code)
> 
>    hydra:filter [
>      hydra:template "/collection?name={schema:name}"
>    ]
> 
> that is expanded to
> 
>    /collection?name=Markus
> 
> would return a collection in which all members correspond to the following
> graph pattern
> 
>   ?member schema:name "Markus"
> 
> 
> PROPOSAL: Add a hydra:filter property with the semantics outlined above.
> 
> Question: If we decide to support "propertyPath" in "PropertyConstraint",
> should we also support propert paths in IRI template mappings? This would
> certainly make filter much more powerful.
> 
> https://github.com/HydraCG/Specifications/issues/45

Yes, this is something like I've been looking for; I'm not sure if aggregations are appropriate here, or would be left to search (probably the later).

You'll need to explain more about URI template variable binding; It seems that schema:name here is somehow used to find "Markus", perhaps in the subject of the collection, and that the "name" query element is interpreted by the service to be schema:name for members of the collection. It might be somewhat confusing if it has two senses that aren't directly related.

From a client's perspective, I would think that these variables would be used to drive HTML form fields, or similar. Is the purpose of specifying the predicate, then, to get the range and description to build such a form entry? Explaining the motivation behind doing this would be useful.

Gregg Kellogg
gregg@greggkellogg.net

Received on Saturday, 19 April 2014 23:56:44 UTC