Freetext query variable representation format or datatype (was: variable representations edited for spec)

>>> However, let's extend the interface with a structured free-text field:
>>>    ?subject / ?predicate / ?object / ?freeText
>>> where the ?freeText field allows control characters (*, ?, .).
>>> Then the first 3 are hydra:ExplicitRepresentation,
>>> and the 4th is ex:FreeTextWithControlChars.
>> 
>> Hmm... I'm not sure you need a separate representation format for that.
My
>> gut feeling is that defining a datatype that defines the query syntax
would
>> be the better choice in such a case. You can then serialize it either
>> including the datatype (ExplicitRepresentation) or without
>> (BasicRepresentation).
> 
> Nah, you run into modeling trouble then: the datatype won't match the
property.

Yes, that's a problem if you define the property which holds that
IriTemplate to filter on the mapped properties by checking for equality.
hydra:search currently has very weak semantics, so nothing prevents you from
doing that. The hydra:filter property with stronger semantics that we
discussed a while ago would obviously need to be defined in a way that takes
this into consideration.


> Suppose I can query foaf:Persons by lastname on wildcards.
> I can't just simply say
>    "?x foaf:familyName "?anthal*"^^<ex:wildcardExpression>
> as foaf:familyName expects a proper string.
> What I should say instead is:
>    "?x foaf:familyName ?n"
> where ?x matches the given wildcard expression.

?n, yeah. Nothing currently specified says that a template with the
variables "x" and "n" results in something like

    "?x foaf:familyName "?anthal*"^^<ex:wildcardExpression>

We just say that a template that is the value of hydra:search can be used to
query something (typically a collection). How the query is constructed is
left open by the current spec. This is something we need to fix (or add
specialized subproperties) but I don't think this is same issue as to
whether a freetext query is a variable representation format (IMO, it
clearly isn't) or a datatype (and thus a "structured value").

Thoughts?


--
Markus Lanthaler
@markuslanthaler

Received on Wednesday, 31 December 2014 15:50:10 UTC